Understand re-run priority
masterWhen re-run counts are specified in multiple places, the following priority order applies (from highest to lowest):
- Test Markers:
@pytest.mark.flaky(reruns=X) - Command Line:
--reruns X - Configuration Files:
reruns = Xinpyproject.tomlorpytest.ini
Note: The --force-reruns CLI flag overrides all of the above. If --reruns-mode=append is used, the marker count and the global setting become additive instead of following this priority.