Skip to content

Commit

Permalink
Merge branch '2.19' into backport-11570-to-2.19
Browse files Browse the repository at this point in the history
  • Loading branch information
avara1986 authored Jan 14, 2025
2 parents c9c826b + 34f71e5 commit 5110796
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/tracer/test_span.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,16 @@ def wrapper():
assert 0, "should have failed"

stack = s.get_tag(ERROR_STACK)
assert stack, "No error stack collected"
# one header "Traceback (most recent call last):" and one footer "ZeroDivisionError: division by zero"
header_and_footer_lines = 2
# Python 3.13 adds extra lines to the traceback:
# File dd-trace-py/tests/tracer/test_span.py", line 279, in test_custom_traceback_size_with_error
# wrapper()
# ~~~~~~~^^
multiplier = 3 if "~~" in stack else 2
assert (
len(stack.splitlines()) == tb_length_limit * 2 + header_and_footer_lines
len(stack.splitlines()) == tb_length_limit * multiplier + header_and_footer_lines
), "stacktrace should contain two lines per entry"

def test_ctx_mgr(self):
Expand Down

0 comments on commit 5110796

Please sign in to comment.