chore: remove decorator kwarg to ensure global conftest applies

This commit is contained in:
Greyson Lalonde
2025-11-07 17:01:30 -05:00
parent 54f8cc685f
commit 19f4ef0982
31 changed files with 1352 additions and 315 deletions

View File

@@ -115,7 +115,7 @@ class TestTraceListenerSetup:
"mark_trace_batch_as_failed": mock_mark_failed,
}
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_trace_listener_collects_crew_events(self):
"""Test that trace listener properly collects events from crew execution"""
@@ -144,7 +144,7 @@ class TestTraceListenerSetup:
assert trace_listener.batch_manager.is_batch_initialized()
assert trace_listener.batch_manager.current_batch is not None
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_batch_manager_finalizes_batch_clears_buffer(self):
"""Test that batch manager properly finalizes batch and clears buffer"""
@@ -202,7 +202,7 @@ class TestTraceListenerSetup:
assert finalize_mock.call_count >= 1
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_events_collection_batch_manager(self, mock_plus_api_calls):
"""Test that trace listener properly collects events from crew execution"""
@@ -255,7 +255,7 @@ class TestTraceListenerSetup:
assert hasattr(event, "event_data")
assert hasattr(event, "type")
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_trace_listener_disabled_when_env_false(self):
"""Test that trace listener doesn't make HTTP calls when tracing is disabled"""
@@ -334,7 +334,7 @@ class TestTraceListenerSetup:
FlowExample()
assert mock_listener_setup.call_count >= 1
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_trace_listener_ephemeral_batch(self):
"""Test that trace listener properly handles ephemeral batches"""
with (
@@ -368,7 +368,7 @@ class TestTraceListenerSetup:
"Batch should have been initialized for unauthenticated user"
)
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_trace_listener_with_authenticated_user(self):
"""Test that trace listener properly handles authenticated batches"""
with patch.dict(os.environ, {"CREWAI_TRACING_ENABLED": "true"}):
@@ -428,7 +428,7 @@ class TestTraceListenerSetup:
if hasattr(EventListener, "_instance"):
EventListener._instance = None
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_first_time_user_trace_collection_with_timeout(self, mock_plus_api_calls):
"""Test first-time user trace collection logic with timeout behavior"""
@@ -489,7 +489,7 @@ class TestTraceListenerSetup:
mock_mark_completed.assert_called_once()
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_first_time_user_trace_collection_user_accepts(self, mock_plus_api_calls):
"""Test first-time user trace collection when user accepts viewing traces"""
@@ -563,7 +563,7 @@ class TestTraceListenerSetup:
mock_mark_completed.assert_called_once()
@pytest.mark.vcr(filter_headers=["authorization"])
@pytest.mark.vcr()
def test_first_time_user_trace_consolidation_logic(self, mock_plus_api_calls):
"""Test the consolidation logic for first-time users vs regular tracing"""
with (