diff --git a/tests/contrib/asyncio/test_tracer.py b/tests/contrib/asyncio/test_tracer.py index cb474786b72..2304544e62b 100644 --- a/tests/contrib/asyncio/test_tracer.py +++ b/tests/contrib/asyncio/test_tracer.py @@ -4,7 +4,6 @@ import pytest from ddtrace.constants import ERROR_MSG -from ddtrace.contrib.internal.asyncio.compat import asyncio_current_task from ddtrace.contrib.internal.asyncio.patch import patch from ddtrace.contrib.internal.asyncio.patch import unpatch @@ -65,20 +64,6 @@ def test_event_loop_exception(tracer): assert ctx is None -def test_context_task_none(tracer): - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - # it should handle the case where a Task is not available - # Note: the @pytest.mark.asyncio is missing to simulate an execution - # without a Task - task = asyncio_current_task() - # the task is not available - assert task is None - - ctx = tracer.current_trace_context() - assert ctx is None - - @pytest.mark.asyncio async def test_exception(tracer): async def f1():