Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test cases file path in sanity test generator #4028

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/generators/sanity/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@
# This is a "hack" which allows other test files (e.g., test_deposit_transition.py)
# to reuse the sanity/block test format. If a new test file is added or removed,
# do not forget to update sanity/block/__init__.py accordingly.
_new_electra_mods = {key: 'eth2spec.test.electra.sanity.' + key for key in [
_new_electra_mods_1 = {key: 'eth2spec.test.electra.sanity.' + key for key in [
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just have

_new_electra_mods = {key: 'eth2spec.test.electra.sanity.' + key for key in [
    'blocks',
    'test_slots’,
]}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried that at the beginning, but due to the key field, it would give us a folder /test_slots/pyspec_tests/* for the test vectors.

Copy link
Member

Choose a reason for hiding this comment

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

What I did locally was to just create a slots folder with __init__.py to match what's done for blocks

from .test_slots import *  # noqa: F401 F403

but as noted in the comment, probably not ideal either

'blocks',
]}
_new_electra_mods_2 = {key: 'eth2spec.test.electra.sanity.test_' + key for key in [
'slots',
]}
_new_electra_mods = {**_new_electra_mods_1, **_new_electra_mods_2}
electra_mods = combine_mods(_new_electra_mods, deneb_mods)

all_mods = {
Expand Down