Closed simonw closed 1 year ago
https://github.com/simonw/llm-palm/actions/runs/5532881233/jobs/10095584713
@patch.dict(os.environ, {"PALM_API_KEY": "X"}) @patch("llm_palm.palm") def test_palm_prompt(mock_palm): mock_response = Mock() mock_response.last = "🐶🐶" mock_palm.chat.return_value = mock_response runner = CliRunner() result = runner.invoke(cli, ["two dog emoji", "-m", "palm"]) > assert result.exit_code == 0, result.output E AssertionError: 🐶🐶 E E assert 1 == 0 E + where 1 = <Result OperationalError('unable to open database file')>.exit_code
I think this is because I'm not setting a LLM_USER_PATH environment variable in the tests.
LLM_USER_PATH
I'd forgotten to check in my conftest.py file.
conftest.py
https://github.com/simonw/llm-palm/actions/runs/5532881233/jobs/10095584713