File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,8 @@ def test_aggregates(sentry_init, capture_envelopes):
5151 envelopes = capture_envelopes ()
5252
5353 with auto_session_tracking (session_mode = "request" ):
54- with sentry_sdk .push_scope () :
54+ with sentry_sdk .new_scope () as scope :
5555 try :
56- scope = sentry_sdk .Scope .get_current_scope ()
5756 scope .set_user ({"id" : "42" })
5857 raise Exception ("all is wrong" )
5958 except Exception :
@@ -92,7 +91,7 @@ def test_aggregates_explicitly_disabled_session_tracking_request_mode(
9291 envelopes = capture_envelopes ()
9392
9493 with auto_session_tracking (session_mode = "request" ):
95- with sentry_sdk .push_scope ():
94+ with sentry_sdk .new_scope ():
9695 try :
9796 raise Exception ("all is wrong" )
9897 except Exception :
@@ -127,7 +126,7 @@ def test_no_thread_on_shutdown_no_errors(sentry_init):
127126 side_effect = RuntimeError ("can't create new thread at interpreter shutdown" ),
128127 ):
129128 with auto_session_tracking (session_mode = "request" ):
130- with sentry_sdk .push_scope ():
129+ with sentry_sdk .new_scope ():
131130 try :
132131 raise Exception ("all is wrong" )
133132 except Exception :
You can’t perform that action at this time.
0 commit comments