Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions opentelemetry-sdk/tests/trace/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,7 @@ def test_parent_child_span_exception(self):
exception_type = exception.__class__.__name__
exception_message = exception.args[0]

child_span = None
try:
with tracer.start_as_current_span(
"parent",
Expand All @@ -2245,6 +2246,8 @@ def test_parent_child_span_exception(self):
except Exception: # pylint: disable=broad-exception-caught
pass

self.assertIsNotNone(child_span)

self.assertTrue(child_span.status.is_ok)
self.assertIsNone(child_span.status.description)
self.assertTupleEqual(child_span.events, ())
Expand Down Expand Up @@ -2275,6 +2278,7 @@ def test_child_parent_span_exception(self):

exception = Exception("exception")

child_span = None
try:
with tracer.start_as_current_span(
"parent",
Expand All @@ -2290,6 +2294,8 @@ def test_child_parent_span_exception(self):
except Exception: # pylint: disable=broad-exception-caught
pass

self.assertIsNotNone(child_span)

self.assertTrue(child_span.status.is_ok)
self.assertIsNone(child_span.status.description)
self.assertTupleEqual(child_span.events, ())
Expand Down
Loading