From c62f3b0a836d891f57c27d36201b13d475026d75 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Wed, 5 Feb 2025 21:47:14 -0500 Subject: [PATCH] fmt --- tests/tracer/test_tracer.py | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/tests/tracer/test_tracer.py b/tests/tracer/test_tracer.py index e5d42bbe648..05b8912d720 100644 --- a/tests/tracer/test_tracer.py +++ b/tests/tracer/test_tracer.py @@ -677,7 +677,9 @@ def test_tracer_shutdown_timeout(): @pytest.mark.subprocess -def test_tracer_shutdown(): +def test_tracer_shutdown( + err=b"Spans started after the tracer has been shut down will not be sent to the Datadog Agent.\n", +): import mock from ddtrace.internal.writer import AgentWriter @@ -691,26 +693,6 @@ def test_tracer_shutdown(): mock_write.assert_not_called() -@pytest.mark.subprocess -def test_tracer_shutdown_warning(): - import logging - - import mock - - from ddtrace.trace import tracer as t - - t.shutdown() - - with mock.patch.object(logging.Logger, "warning") as mock_logger: - with t.trace("something"): - pass - - mock_logger.assert_has_calls( - [ - mock.call("Spans started after the tracer has been shut down will not be sent to the Datadog Agent."), - ] - ) - @pytest.mark.skip(reason="Fails to Pickle RateLimiter in the Tracer") @pytest.mark.subprocess