Skip to content

feat(pytest): use node id as fixture name#342

Merged
danceratopz merged 4 commits intoethereum:mainfrom
danceratopz:feat/pytest/use-node-id-as-fixture-name
Nov 7, 2023
Merged

feat(pytest): use node id as fixture name#342
danceratopz merged 4 commits intoethereum:mainfrom
danceratopz:feat/pytest/use-node-id-as-fixture-name

Conversation

@danceratopz
Copy link
Copy Markdown
Member

@danceratopz danceratopz commented Nov 3, 2023

🗒️ Description

This PR:

🔗 Related Issues

Fixes #329.

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@danceratopz danceratopz added scope:pytest Scope: Changes EEST's pytest plugins scope:tests Scope: Changes EL client test cases in `./tests` type:feat type: Feature labels Nov 3, 2023
Copy link
Copy Markdown
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks :)

Copy link
Copy Markdown
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I like it a lot!

Maybe we could rename test_filler.py to:

  • pytest_filler.py
  • plugin_filler.py

Then for src/ethereum_test_tools/tests/test_filler.py, we could rename this to framework_filler.py.

Then again test_test_filler.py makes me smile :)

Comment thread docs/CHANGELOG.md Outdated
Co-authored-by: spencer <spencer.taylor-brown@ethereum.org>
@danceratopz
Copy link
Copy Markdown
Member Author

LGTM - I like it a lot!

Maybe we could rename test_filler.py to:

* `pytest_filler.py`

* `plugin_filler.py`

Then for src/ethereum_test_tools/tests/test_filler.py, we could rename this to framework_filler.py.

Then again test_test_filler.py makes me smile :)

Hehe, as mentioned offline, one possibility is renaming test_filler to fixture_filler (which fits well with the fixture_consumer in #339). The test_ prefix for the pytest plugin gets me every time :)

@danceratopz danceratopz merged commit 14a629d into ethereum:main Nov 7, 2023
danceratopz added a commit to danceratopz/execution-spec-tests that referenced this pull request Nov 17, 2023
…ate-pytest-command

To get changes from feat(pytest): use node id as fixture name ethereum#342.
danceratopz added a commit to danceratopz/execution-spec-tests that referenced this pull request Nov 29, 2023
danceratopz added a commit to danceratopz/execution-spec-tests that referenced this pull request Feb 8, 2024
The evm blocktest command --run flag takes a regex specifying the fixtures in the json file to execute. Required as ethereum#342 changed fixture names in json to match the test ID that generated the fixture (and these always contain '[',  ']', and potentially other regex syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:pytest Scope: Changes EEST's pytest plugins scope:tests Scope: Changes EL client test cases in `./tests` type:feat type: Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(fw): use pytest nodeids as test names in json fixtures

3 participants