mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-24 23:58:15 +00:00
fix: reset telemetry singleton in tests to prevent state persistence on Python 3.10
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -95,6 +95,9 @@ class TestOptionalDependencies:
|
||||
|
||||
def test_opentelemetry_graceful_degradation(self):
|
||||
"""Test that telemetry degrades gracefully without opentelemetry."""
|
||||
from crewai.telemetry.telemetry import Telemetry
|
||||
Telemetry._reset_instance()
|
||||
|
||||
with patch.dict('sys.modules', {'opentelemetry': None}):
|
||||
with patch('crewai.telemetry.telemetry.OPENTELEMETRY_AVAILABLE', False):
|
||||
from crewai.telemetry.telemetry import Telemetry
|
||||
|
||||
Reference in New Issue
Block a user