File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
tests/integrations/litellm Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -566,10 +566,15 @@ def test_litellm_specific_parameters(sentry_init, capture_events):
566566 assert span ["data" ]["gen_ai.litellm.custom_llm_provider" ] == "custom_provider"
567567
568568
569- def test_no_integration (sentry_init , capture_events ):
569+ def test_no_integration (
570+ sentry_init , capture_events , reset_integrations , uninstall_integration
571+ ):
570572 """Test that when integration is not enabled, callbacks don't break."""
573+ # Reset integrations since LiteLLM is now auto-enabled and we need to test
574+ # the behavior when it's explicitly disabled
571575 sentry_init (
572576 traces_sample_rate = 1.0 ,
577+ disabled_integrations = [LiteLLMIntegration ],
573578 )
574579 events = capture_events ()
575580
@@ -597,6 +602,9 @@ def test_no_integration(sentry_init, capture_events):
597602 assert event ["type" ] == "transaction"
598603 assert len (event .get ("spans" , [])) == 0
599604
605+ # Clean up: uninstall litellm so subsequent tests can re-install it
606+ uninstall_integration ("litellm" )
607+
600608
601609def test_response_without_usage (sentry_init , capture_events ):
602610 """Test handling of responses without usage information."""
You can’t perform that action at this time.
0 commit comments