From 8cc60822e84744ed12bd2963cf47b03511492380 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 28 Apr 2025 21:38:46 -0400 Subject: [PATCH] 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 --- tests/test_basics.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_basics.py b/tests/test_basics.py index 94ced5013a..7aa2f0f0d5 100644 --- a/tests/test_basics.py +++ b/tests/test_basics.py @@ -1151,10 +1151,8 @@ def recurse(): (event,) = events assert event["exception"]["values"][0]["stacktrace"] is None - assert event["_meta"] == { - "exception": { - "values": {"0": {"stacktrace": {"": {"rem": [["!config", "x"]]}}}} - } + assert event["_meta"]["exception"] == { + "values": {"0": {"stacktrace": {"": {"rem": [["!config", "x"]]}}}} } # On my machine, it takes about 100-200ms to capture the exception,