diff --git a/tests/conftest.py b/tests/conftest.py index acf60bc7c..63f1d6aba 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1155,6 +1155,14 @@ def databricks_fixture(fail_missing: bool): fail_missing=fail_missing) +@pytest.fixture(name="numexpr", scope='session') +def numexpr_fixture(fail_missing: bool): + """ + Fixture to ensure numexpr is installed + """ + yield import_or_skip("numexpr", reason=OPT_DEP_SKIP_REASON.format(package="numexpr"), fail_missing=fail_missing) + + @pytest.mark.usefixtures("openai") @pytest.fixture(name="mock_chat_completion") def mock_chat_completion_fixture(): diff --git a/tests/morpheus_llm/llm/test_agents_simple_pipe.py b/tests/morpheus_llm/llm/test_agents_simple_pipe.py index 8aa9e0d0e..b6105f4be 100644 --- a/tests/morpheus_llm/llm/test_agents_simple_pipe.py +++ b/tests/morpheus_llm/llm/test_agents_simple_pipe.py @@ -127,7 +127,7 @@ def test_agents_simple_pipe_integration_openai(config: Config, questions: list[s assert float(response_match.group(1)) >= 3.7 -@pytest.mark.usefixtures("langchain_community", "langchain_openai", "openai", "restore_environ") +@pytest.mark.usefixtures("langchain_community", "langchain_openai", "numexpr", "openai", "restore_environ") @mock.patch("langchain_community.utilities.serpapi.SerpAPIWrapper.aresults") @mock.patch("langchain_openai.OpenAI._agenerate", autospec=True) # autospec is needed as langchain will inspect the function