summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-08-02 13:22:58 -0500
committerEric Eastwood <erice@element.io>2022-08-02 13:22:58 -0500
commit36d6648fad996028de6645f62c85ab2913485a9c (patch)
tree3f5765f454b66c38615af129f449ed27b117c857
parentFix lints (diff)
downloadsynapse-36d6648fad996028de6645f62c85ab2913485a9c.tar.xz
Remove type ignore comments
See https://github.com/matrix-org/synapse/pull/13400#discussion_r935887649
-rw-r--r--tests/logging/test_tracing.py13
1 files changed, 0 insertions, 13 deletions
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(