diff --git a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py index b7054f6448..ee8b7ab697 100644 --- a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py +++ b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py @@ -589,7 +589,7 @@ def test_exclude_internal_spans(self): app.exclude_send_span = exclude_send_span self.send_default_request() span_list = self.memory_exporter.get_finished_spans() - assert span_list + self.assertTrue(span_list) for span in span_list: for excluded_span in excluded_spans: self.assertNotEqual(span.name, excluded_span)