Skip to content

Commit 8cc6082

Browse files
committed
tests: fix test_stacktrace_big_recursion failure due to argv
Sometimes I see the test failing because the event contains `extras` with `sys.argv` key in addition to `exception`. There's probably some state leaking between tests, but regardless this patch should make the test case slightly more robust. Signed-off-by: Ihar Hrachyshka <[email protected]>
1 parent bbdf789 commit 8cc6082

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_basics.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1151,10 +1151,8 @@ def recurse():
11511151
(event,) = events
11521152

11531153
assert event["exception"]["values"][0]["stacktrace"] is None
1154-
assert event["_meta"] == {
1155-
"exception": {
1156-
"values": {"0": {"stacktrace": {"": {"rem": [["!config", "x"]]}}}}
1157-
}
1154+
assert event["_meta"]["exception"] == {
1155+
"values": {"0": {"stacktrace": {"": {"rem": [["!config", "x"]]}}}}
11581156
}
11591157

11601158
# On my machine, it takes about 100-200ms to capture the exception,

0 commit comments

Comments
 (0)