diff --git a/tests/conftest.py b/tests/conftest.py index 20995b7b6cd..d02964f9d0b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,6 +27,7 @@ from ddtrace._trace.provider import _DD_CONTEXTVAR from ddtrace.internal.compat import httplib from ddtrace.internal.compat import parse +from ddtrace.internal.core import crashtracking from ddtrace.internal.remoteconfig.client import RemoteConfigClient from ddtrace.internal.remoteconfig.worker import remoteconfig_poller from ddtrace.internal.runtime import get_runtime_id @@ -113,6 +114,19 @@ def use_global_tracer(): yield False +@pytest.fixture +def auto_enable_crashtracking(): + yield True + + +@pytest.fixture(autouse=True) +def enable_crashtracking(auto_enable_crashtracking): + if auto_enable_crashtracking: + crashtracking.start() + assert crashtracking.is_started() + yield + + @pytest.fixture def tracer(use_global_tracer): if use_global_tracer: