Skip to content

refactor(tests): centralize legacy era parametrization#3366

Merged
mkoura merged 1 commit intomasterfrom
add_param_compat_eras
Mar 16, 2026
Merged

refactor(tests): centralize legacy era parametrization#3366
mkoura merged 1 commit intomasterfrom
add_param_compat_eras

Conversation

@mkoura
Copy link
Collaborator

@mkoura mkoura commented Mar 13, 2026

Move the list of legacy eras ("shelley", "allegra", "mary", "alonzo", "babbage") to a single constant and parametrize marker (PARAM_COMPAT_ERAS) in common.py. Update all test files to use the new shared marker for era parametrization, improving maintainability and reducing duplication.

Move the list of legacy eras ("shelley", "allegra", "mary", "alonzo", "babbage") to a single constant and parametrize marker (`PARAM_COMPAT_ERAS`) in `common.py`. Update all test files to use the new shared marker for era parametrization, improving maintainability and reducing duplication.
@mkoura mkoura requested a review from saratomaz as a code owner March 13, 2026 14:00
@mkoura mkoura requested review from Copilot and removed request for saratomaz March 13, 2026 14:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Centralizes the list of legacy eras and reuses a shared pytest parametrization marker across tests to reduce duplication and simplify future updates.

Changes:

  • Add COMPAT_ERAS and PARAM_COMPAT_ERAS to tests/common.py.
  • Replace repeated @pytest.mark.parametrize("era", (...)) usage with @common.PARAM_COMPAT_ERAS across multiple test modules.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cardano_node_tests/tests/common.py Introduces a shared legacy-era tuple and a reusable pytest parametrization decorator.
cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py Switches era parametrization to the shared common marker.
cardano_node_tests/tests/tests_conway/test_pparam_update.py Switches era parametrization to the shared common marker.
cardano_node_tests/tests/tests_conway/test_conway.py Switches era parametrization to the shared common marker.
cardano_node_tests/tests/test_pools.py Switches era parametrization to the shared common marker.
cardano_node_tests/tests/test_delegation.py Switches era parametrization to the shared common marker.
cardano_node_tests/tests/test_addr_registration.py Switches era parametrization to the shared common marker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@mkoura mkoura merged commit 1e7eabf into master Mar 16, 2026
7 checks passed
@mkoura mkoura deleted the add_param_compat_eras branch March 16, 2026 11:11
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