Skip to content

Commit 1d17d57

Browse files
test(client): Avoid configure_scope (#3350)
Replace the only `configure_scope` usage in `test_client.py`, which can be replaced without defeating the test's purpose, with `Scope.get_isolation_scope`. The other `configure_scope` calls are made either from a test which specifically tests `configure_scope` or from a test which is always skipped. Closes: #3344
1 parent 132a9c5 commit 1d17d57

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/test_client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -686,14 +686,13 @@ def test_cyclic_data(sentry_init, capture_events):
686686
sentry_init()
687687
events = capture_events()
688688

689-
with configure_scope() as scope:
690-
data = {}
691-
data["is_cyclic"] = data
689+
data = {}
690+
data["is_cyclic"] = data
692691

693-
other_data = ""
694-
data["not_cyclic"] = other_data
695-
data["not_cyclic2"] = other_data
696-
scope.set_extra("foo", data)
692+
other_data = ""
693+
data["not_cyclic"] = other_data
694+
data["not_cyclic2"] = other_data
695+
sentry_sdk.Scope.get_isolation_scope().set_extra("foo", data)
697696

698697
capture_message("hi")
699698
(event,) = events

0 commit comments

Comments
 (0)