@@ -16,15 +16,15 @@ def test_raises_import_error_with_pypi_name_for_openai(self):
1616 with pytest .raises (ImportError ) as exc_info :
1717 RunnerFactory ._pkg_exists ('ldai_openai' )
1818 assert 'launchdarkly-server-sdk-ai-openai' in str (exc_info .value )
19- assert 'pip install launchdarkly-server-sdk-ai-openai' in str (exc_info .value )
19+ assert 'pip install' not in str (exc_info .value )
2020
2121 def test_raises_import_error_with_pypi_name_for_langchain (self ):
2222 with patch ('ldai.providers.runner_factory.util' ) as mock_util :
2323 mock_util .find_spec .return_value = None
2424 with pytest .raises (ImportError ) as exc_info :
2525 RunnerFactory ._pkg_exists ('ldai_langchain' )
2626 assert 'launchdarkly-server-sdk-ai-langchain' in str (exc_info .value )
27- assert 'pip install launchdarkly-server-sdk-ai-langchain' in str (exc_info .value )
27+ assert 'pip install' not in str (exc_info .value )
2828
2929 def test_raises_import_error_with_module_name_when_no_mapping (self ):
3030 """Unknown module names fall back to the module name itself."""
@@ -74,11 +74,11 @@ def test_warning_includes_pypi_name_for_langchain(self):
7474 assert 'launchdarkly-server-sdk-ai-langchain' in warning_text
7575 assert 'ldai_langchain' not in warning_text
7676
77- def test_warning_does_not_contain_make_sure_text (self ):
78- """The old boilerplate text should be replaced by actionable pip install instructions ."""
77+ def test_warning_does_not_reference_pip (self ):
78+ """Warning should be package-manager agnostic — no pip install command ."""
7979 with patch ('ldai.providers.runner_factory.util' ) as mock_util , \
8080 patch ('ldai.providers.runner_factory.log' ) as mock_log :
8181 mock_util .find_spec .return_value = None
8282 RunnerFactory ._get_provider_factory ('openai' )
8383 warning_text = mock_log .warning .call_args [0 ][0 ]
84- assert 'Make sure the corresponding package is installed ' not in warning_text
84+ assert 'pip install ' not in warning_text
0 commit comments