diff --git a/tests/logging/test_tracing.py b/tests/logging/test_tracing.py
index 98a37e5235..d380c3b9ad 100644
--- a/tests/logging/test_tracing.py
+++ b/tests/logging/test_tracing.py
@@ -64,13 +64,11 @@ class TracingTestCase(TestCase):
# start_active_span should start and activate a span.
with start_active_span("new-span", tracer=self._tracer) as span:
self.assertEqual(opentelemetry.trace.get_current_span(), span)
- self.assertIsNotNone(span.start_time) # type: ignore[attr-defined]
# ... but leaving it unsets the active span, and finishes the span.
self.assertEqual(
opentelemetry.trace.get_current_span(), opentelemetry.trace.INVALID_SPAN
)
- self.assertIsNotNone(span.end_time) # type: ignore[attr-defined]
# the span should have been reported
self.assertListEqual(
@@ -81,7 +79,6 @@ class TracingTestCase(TestCase):
"""Starting two spans off inside each other should work"""
with start_active_span("root_span", tracer=self._tracer) as root_span:
self.assertEqual(opentelemetry.trace.get_current_span(), root_span)
- root_context = root_span.get_span_context()
with start_active_span(
"child_span1",
@@ -92,10 +89,6 @@ class TracingTestCase(TestCase):
child_span1,
"child_span1 was not activated",
)
- self.assertEqual(
- child_span1.parent.span_id, # type: ignore[attr-defined]
- root_context.span_id,
- )
with start_active_span(
"child_span2",
@@ -104,15 +97,9 @@ class TracingTestCase(TestCase):
self.assertEqual(
opentelemetry.trace.get_current_span(), child_span2
)
- self.assertEqual(
- child_span2.parent.span_id, # type: ignore[attr-defined]
- child_span1.get_span_context().span_id,
- )
# the root scope should be restored
self.assertEqual(opentelemetry.trace.get_current_span(), root_span)
- self.assertIsNotNone(child_span1.end_time) # type: ignore[attr-defined]
- self.assertIsNotNone(child_span2.end_time) # type: ignore[attr-defined]
# Active span is unset now that we're outside of the `with` scopes
self.assertEqual(
|