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

feat(pytest): add option to write one fixture per json file #331

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Oct 13, 2023

🗒️ Description

  • Adds a command-line option --single-fixture-per-file:
      --single-fixture-per-file
                            Don't group fixtures in JSON files by test function;
                            write each fixture to its own file. This can be used to
                            increase the granularity of --verify-fixtures.
    
  • Adds tests for fixture output for different command-line option combinations:
    test_fixture_output_based_on_command_line_args[default-args]
    test_fixture_output_based_on_command_line_args[flat-output]
    test_fixture_output_based_on_command_line_args[flat-output_custom-output-dir]
    test_fixture_output_based_on_command_line_args[flat-output_custom-output-dir_enable-hive]
    test_fixture_output_based_on_command_line_args[single-fixture-per-file]
    test_fixture_output_based_on_command_line_args[single-fixture-per-file_custom_output_dir]
    test_fixture_output_based_on_command_line_args[single-fixture-per-file_custom_output_dir_enable-hive]
    test_fixture_output_based_on_command_line_args[flat-single-per-file_flat-output]
    

🔗 Related Issues

#185

✅ 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:evm Scope: evm_transition_tool package type:feat type: Feature scope:fw Scope: Framework (evm|tools|forks|pytest) labels Oct 13, 2023
@danceratopz danceratopz marked this pull request as ready for review October 20, 2023 19:12
Copy link
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.

Looks amazing, I really appreciate the tests under test_test_filler.py, it's really cool how we can test this functionality.

@danceratopz danceratopz merged commit 7153354 into ethereum:main Oct 26, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:evm Scope: evm_transition_tool package scope:fw Scope: Framework (evm|tools|forks|pytest) type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants