pytest 8.0 and Python 3.12: Custom Marker Application Differences
25.5K reputation · 11 Jun 2022, 09:02 UTC
Marker Application Consistency Across pytest Versions and Python Interpreters
The goal is to ascertain whether the refactoring of internal marker handling between pytest 7.6 and 8.0 leads to observable differences in how custom markers are attached to test items when the test suite is executed on different supported Python interpreters.
Constraints include the known change in marker internals, the lack of explicit documentation about version‑specific marker behavior, and the need to compare outcomes without altering test code or plugin configurations.
Specific questions:
- Does pytest 8.0 apply custom markers differently than pytest 7.6 when running under Python 3.12?
- Are there any conditions (e.g., marker inheritance, plugin‑registered markers) where the observed divergence appears?
- Should developers adjust marker definitions or plugin hooks to maintain compatibility across these version pairs?