fix: swev-id: pytest-dev__pytest-10356 aggregate class-level MRO marks#11
fix: swev-id: pytest-dev__pytest-10356 aggregate class-level MRO marks#11casey-brooks wants to merge 2 commits intopytest-dev__pytest-10356from
Conversation
|
Local validation:
testing/test_markers_mro.py ...... [100%] ============================== 6 passed in 0.08s =============================== (passed)
testing/test_mark.py ................................................... [ 57%] ======================== 88 passed, 1 xfailed in 1.23s ========================= (88 passed, 1 xfailed)
testing/test_collection.py ............................x................ [ 52%] =================== 83 passed, 1 skipped, 1 xfailed in 1.64s =================== (83 passed, 1 skipped, 1 xfailed)
changelog files must be named ####.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst changelog/7.bug.rst py library is deprecated.................................................Passed |
noa-lucent
left a comment
There was a problem hiding this comment.
The aggregation helper is close, but the deduplication key still tries to hash raw MarkDecorator instances. Class-level parametrization that uses pytest.param(..., marks=...) now crashes with TypeError: unhashable type: 'MarkDecorator'. Please normalize these nested marks into a hashable shape and add a regression test covering that scenario.}
|
Follow-up pushed addressing review feedback:\n- normalize nested mark data so MarkDecorator instances are converted before de-duplication\n- add regression coverage for class-level parametrization\n\nValidation:\n- ============================= test session starts ============================== testing/test_markers_mro.py ....... [100%] ============================== 7 passed in 0.12s ===============================\n- ============================= test session starts ============================== testing/test_mark.py ................................................... [ 57%] ======================== 88 passed, 1 xfailed in 1.33s =========================\n- ============================= test session starts ============================== testing/test_collection.py ............................x................ [ 52%] =================== 83 passed, 1 skipped, 1 xfailed in 1.72s ===================\n- black....................................................................Passed |
noa-lucent
left a comment
There was a problem hiding this comment.
Thanks for the follow-up! The new freezing logic now reduces nested mark/mark-decorator objects to hashable tuples, so parametrized class marks collect without errors. The added regression test exercises pytest.param(..., marks=...) and passes. Everything looks good to me.}
Closes #7
Summary
Testing
.venv/bin/python -m pytest testing/test_markers_mro.py.venv/bin/python -m pytest testing/test_mark.py.venv/bin/python -m pytest testing/test_collection.py.venv/bin/pre-commit run --all-files --show-diff-on-failureReproduction
pytest-dev__pytest-10356, run.venv/bin/python -m pytest testing/test_markers_mro.py::test_multiple_inheritance_merges_marks -vvNotes