Skip to content

Commit

Permalink
fix(pytest-filler): Remove collected items without parametrized fork (#…
Browse files Browse the repository at this point in the history
…452)

* fix(pytest-filler): Remove collected items without parametrized fork

* changelog
  • Loading branch information
marioevz authored Feb 28, 2024
1 parent 0f67b6c commit e755777
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Test fixtures for use by clients are available for each release on the [Github r
- 🔀 Helper methods `to_address`, `to_hash` and `to_hash_bytes` have been deprecated in favor of `Address` and `Hash`, which are automatically detected as opcode parameters and pushed to the stack in the resulting bytecode ([#422](https://github.com/ethereum/execution-spec-tests/pull/422)).
-`Opcodes` enum now contains docstrings with each opcode description, including parameters and return values, which show up in many development environments ([#424](https://github.com/ethereum/execution-spec-tests/pull/424)) @ThreeHrSleep.
- 🔀 Locally calculate state root for the genesis blocks in the blockchain tests instead of calling t8n ([#450](https://github.com/ethereum/execution-spec-tests/pull/450)).
- 🐞 Fix bug that causes an exception during test collection because the fork parameter contains `None` ([#452](https://github.com/ethereum/execution-spec-tests/pull/452)).

### 🔧 EVM Tools

Expand Down
5 changes: 4 additions & 1 deletion src/pytest_plugins/test_filler/test_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def do_fixture_verification(request, t8n) -> bool:
@pytest.fixture(autouse=True, scope="session")
def evm_fixture_verification(
request, do_fixture_verification: bool, evm_bin: Path, verify_fixtures_bin: Path
) -> Optional[Generator[TransitionTool, None, None]]:
) -> Generator[Optional[TransitionTool], None, None]:
"""
Returns the configured evm binary for executing statetest and blocktest
commands used to verify generated JSON fixtures.
Expand Down Expand Up @@ -493,6 +493,9 @@ def pytest_collection_modifyitems(config, items):
for item in items[:]: # use a copy of the list, as we'll be modifying it
if isinstance(item, EIPSpecTestItem):
continue
if "fork" not in item.callspec.params or item.callspec.params["fork"] is None:
items.remove(item)
continue
if item.callspec.params["fork"] < Paris:
# Even though the `state_test` test spec does not produce a hive STATE_TEST, it does
# produce a BLOCKCHAIN_TEST_HIVE, so we need to remove it here.
Expand Down

0 comments on commit e755777

Please sign in to comment.