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

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Nov 28, 2024

Fix the leftover of #4024.

Thank @nflaig for reporting it!

@@ -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
Collaborator

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
Contributor

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

Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@jtraglia jtraglia merged commit 62a5c5f into dev Dec 2, 2024
26 checks passed
@jtraglia jtraglia deleted the fix-sanity-testgen branch December 2, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants