datasette icon indicating copy to clipboard operation
datasette copied to clipboard

datasette package add `--config` CLI option (#2378)

Open king7532 opened this issue 1 year ago • 2 comments

See issue #2378.


📚 Documentation preview 📚: https://datasette--2379.org.readthedocs.build/en/2379/

king7532 avatar Aug 03 '24 22:08 king7532

A few tests are failing with errors like this:

    def test_publish_cloudrun_extra_options(
        mock_call, mock_output, mock_which, extra_options, expected, tmp_path_factory
    ):
        mock_which.return_value = True
        mock_output.return_value = "myproject"
    
        runner = CliRunner()
        os.chdir(tmp_path_factory.mktemp("runner"))
        with open("test.db", "w") as fp:
            fp.write("data")
        result = runner.invoke(
            cli.cli,
            [
                "publish",
                "cloudrun",
                "test.db",
                "--service",
                "datasette",
                "--show-files",
                "--extra-options",
                extra_options,
            ],
        )
>       assert result.exit_code == 0
E       assert 1 == 0
E        +  where 1 = <Result AttributeError("'str' object has no attribute 'read'")>.exit_code

simonw avatar Aug 15 '24 20:08 simonw

@simonw all the failing tests are in tests/test_publish_cloudrun.py and this line is failing for all the tests:

assert result.exit_code == 0

king7532 avatar Aug 24 '24 18:08 king7532