Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur committed Feb 6, 2025
1 parent ac55696 commit 7fda1a7
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/contrib/asyncio/test_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 7fda1a7

Please sign in to comment.