Skip to content

Commit 5a5ca51

Browse files
committed
Fix flaky test
1 parent 554c391 commit 5a5ca51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integrations/logging/test_logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ def test_logging_captured_warnings(sentry_init, capture_events, recwarn):
259259
assert events[1]["logentry"]["params"] == []
260260

261261
# Using recwarn suppresses the "third" warning in the test output
262-
assert len(recwarn) == 1
263-
assert str(recwarn[0].message) == "third"
262+
third_warnings = [w for w in recwarn if str(w.message) == "third"]
263+
assert len(third_warnings) == 1
264264

265265

266266
def test_ignore_logger(sentry_init, capture_events):

0 commit comments

Comments
 (0)