Adding a New TestΒΆ
All test cases are located underneath the tests directory, which are then organized by fork. Each fork contains sub-directories containing test sub-categories.
π execution-specs/
βββ΄π tests/
| βββ π __init__.py
β βββ π cancun/
| | βββ π __init__.py
β | βββ π eip4844_blobs/
| | βββ π __init__.py
| | βββ π test_blobhash_opcode.py
| | βββ π test_excess_blob_gas.py
| | βββ π ...
| βββ π shanghai
| | βββ π eip3651_warm_coinbase
| | | βββ π __init__.py
| | | βββ π test_warm_coinbase.py
| | βββ π eip3855_push0
| | | βββ π __init__.py
| | | βββ π test_push0.py
| | βββ π...
| | ...
β βββ π ...
Each category/sub-directory may have multiple Python test modules (*.py) which in turn may contain many test functions. The test functions themselves are always parametrized by fork (by the framework).
A new test can be added by either:
- Adding a new
test_python function to an existing file in any of the existing category subdirectories withintests. - Creating a new source file in an existing category, and populating it with the new test function(s).
- Creating an entirely new category by adding a subdirectory in
testswith the appropriate source files and test functions.