Skip to content

Conversation

@SamWilsn
Copy link
Contributor

🗒️ Description

Teaches the json_infra tests how to read the set of tests to execute from a file. Useful in conjunction with minimize-tests.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@SamWilsn SamWilsn requested a review from gurukamath November 24, 2025 20:20
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.31%. Comparing base (85c6fff) to head (a6005fb).
⚠️ Report is 8 commits behind head on forks/osaka.

Additional details and impacted files
@@             Coverage Diff              @@
##           forks/osaka    #1807   +/-   ##
============================================
  Coverage        87.31%   87.31%           
============================================
  Files              541      541           
  Lines            32832    32832           
  Branches          3015     3015           
============================================
  Hits             28668    28668           
  Misses            3557     3557           
  Partials           607      607           
Flag Coverage Δ
unittests 87.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

return

with open(tests_path) as f:
test_ids = set(x[:-1] for x in f.readlines())
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
test_ids = set(x[:-1] for x in f.readlines())
test_ids = set(line.strip() for line in f)

Otherwise, this could skip the last test in the file, if the file does not end with a new line

),
)

parser.addoption(
Copy link
Contributor

Choose a reason for hiding this comment

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

Some of these options might end up contradicting each other. For example, we might have --fork=Frontier and the tests file might have an entry called tests/json_infra/fixtures/latest_fork_tests/fixtures/state_tests/berlin/eip2930_access_list/test_account_storage_warm_cold_state.json::tests/berlin/eip2930_access_list/test_acl.py::test_account_storage_warm_cold_state[fork_Shanghai-state_test-account_warm_True-storage_key_warm_True]::Shanghai::0 which is from Shanghai.

In this set-up, the Shanghai tests will not run. Is this what is intended? Alternatively, we could just make it invalid to pair the --tests-file option with the others.

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 think this makes sense. If I'm not mistaken, the following command wouldn't run any tests either, so this behaviour is consistent.

pytest --fork=Frontier \
    'tests/json_infra/fixtures/latest_fork_tests/fixtures/state_tests/berlin/eip2930_access_list/test_account_storage_warm_cold_state.json::tests/berlin/eip2930_access_list/test_acl.py::test_account_storage_warm_cold_state[fork_Shanghai-state_test-account_warm_True-storage_key_warm_True]::Shanghai::0'

@SamWilsn SamWilsn merged commit 120b1be into ethereum:forks/osaka Dec 5, 2025
11 checks passed
@SamWilsn SamWilsn deleted the tests-file branch December 5, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants