Skip to content

Commit 5ca434c

Browse files
thodson-usgsclaude
andcommitted
Clarify pytestmark comment per Copilot review
Make explicit that the marker is attached to every test in the module, but the only_rerun patterns are tied to real-network failure traces, so mocked tests are no-ops for the rerun by construction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 047130f commit 5ca434c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/waterdata_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@
3737
# PR #273, transient upstream errors (5xx / 429 / connection drops)
3838
# propagate instead of silently truncating, which makes CI susceptible
3939
# to flaking on a brief upstream blip. Auto-retry such failures, but
40-
# only for the narrow set of transient-error trace patterns — library
41-
# bugs raising other exception types still fail on the first try.
42-
# Tests in this file that use ``requests_mock`` or ``mock.patch`` won't
43-
# match these patterns and so are effectively unaffected.
40+
# only for the narrow set of transient-error trace patterns below —
41+
# library bugs raising other exception types still fail on the first
42+
# try. The marker is attached to every test in the module, but the
43+
# patterns match only traces produced by real network round-trips
44+
# (``_raise_for_non_200`` output, ``requests`` exceptions), so tests
45+
# using ``requests_mock`` or ``mock.patch`` are no-ops for the rerun.
4446
pytestmark = pytest.mark.flaky(
4547
reruns=2,
4648
reruns_delay=5,

0 commit comments

Comments
 (0)