Skip to content

Commit 581e23b

Browse files
authored
ref(threading): Use new scopes API in tests (#2900)
1 parent fdf794f commit 581e23b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integrations/threading/test_threading.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
import pytest
66

77
import sentry_sdk
8-
from sentry_sdk import configure_scope, capture_message
8+
from sentry_sdk import capture_message
99
from sentry_sdk.integrations.threading import ThreadingIntegration
10+
from sentry_sdk.scope import Scope
1011

1112
original_start = Thread.start
1213
original_run = Thread.run
@@ -44,8 +45,7 @@ def test_propagates_hub(sentry_init, capture_events, propagate_hub):
4445
events = capture_events()
4546

4647
def stage1():
47-
with configure_scope() as scope:
48-
scope.set_tag("stage1", "true")
48+
Scope.get_isolation_scope().set_tag("stage1", "true")
4949

5050
t = Thread(target=stage2)
5151
t.start()

0 commit comments

Comments
 (0)