Skip to content

Commit e329179

Browse files
authored
Ignore deliberate thread exception warnings (#4611)
1 parent 1b4f8d3 commit e329179

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/integrations/threading/test_threading.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
original_run = Thread.run
1414

1515

16+
@pytest.mark.filterwarnings("ignore:.*:pytest.PytestUnhandledThreadExceptionWarning")
1617
@pytest.mark.parametrize("integrations", [[ThreadingIntegration()], []])
1718
def test_handles_exceptions(sentry_init, capture_events, integrations):
1819
sentry_init(default_integrations=False, integrations=integrations)
@@ -36,6 +37,7 @@ def crash():
3637
assert not events
3738

3839

40+
@pytest.mark.filterwarnings("ignore:.*:pytest.PytestUnhandledThreadExceptionWarning")
3941
@pytest.mark.parametrize("propagate_hub", (True, False))
4042
def test_propagates_hub(sentry_init, capture_events, propagate_hub):
4143
sentry_init(
@@ -125,6 +127,7 @@ def run(self):
125127
assert unreachable_objects == 0
126128

127129

130+
@pytest.mark.filterwarnings("ignore:.*:pytest.PytestUnhandledThreadExceptionWarning")
128131
def test_double_patching(sentry_init, capture_events):
129132
sentry_init(default_integrations=False, integrations=[ThreadingIntegration()])
130133
events = capture_events()

0 commit comments

Comments
 (0)