simonw / llm-palm

Plugin for LLM adding support for Google's PaLM 2 model
Apache License 2.0
14 stars 4 forks source link

CI failure: unable to open database file #4

Closed simonw closed 1 year ago

simonw commented 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
simonw commented 1 year ago

I think this is because I'm not setting a LLM_USER_PATH environment variable in the tests.

simonw commented 1 year ago

I'd forgotten to check in my conftest.py file.