Skip to content

tests: strengthen pytest pair-parametrize tests and signature validation#6

Merged
Code0x58 merged 1 commit into
masterfrom
codex/update-tests-for-pytest_parametrize_pairs
May 9, 2026
Merged

tests: strengthen pytest pair-parametrize tests and signature validation#6
Code0x58 merged 1 commit into
masterfrom
codex/update-tests-for-pytest_parametrize_pairs

Conversation

@Code0x58
Copy link
Copy Markdown
Owner

@Code0x58 Code0x58 commented May 9, 2026

Motivation

  • Improve coverage and correctness of pair parametrization tests for the alternative/reference utilities by verifying signature preservation and parameter values.
  • Make tests more explicit about which implementations are selected for default/double-reference modes.

Description

  • Added inspect import and helper _parametrize_values to extract pytest.mark.parametrize values from a decorated test function.
  • Renamed and replaced the previous pair-parametrize test with test_pytest_parametrize_pairs_signature_and_parameters which asserts that pytest_parametrize_pairs preserves the original test signature and configures reference/implementation parameter values as expected.
  • Updated test reference and implementation callables to have explicit typed signatures (x: int, y: int = 0) -> int and added a pair_test callable to be decorated by pytest_parametrize_pairs for assertion checks.
  • Minor docstring cleanup in test_f to reflect default pair parametrization behavior.

Testing

  • Ran the test module with pytest -q test_pytest_util.py and all tests in that file passed.
  • The new assertions validate function signatures, the contents of parametrized reference and implementation values, and basic execution of the decorated pair test.

Codex Task

@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8bc0620) to head (d06279a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##            master        #6   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          189       189           
=========================================
  Hits           189       189           

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

@Code0x58 Code0x58 merged commit 2b32a61 into master May 9, 2026
5 checks passed
@Code0x58 Code0x58 deleted the codex/update-tests-for-pytest_parametrize_pairs branch May 9, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant