MCPcopy Create free account
hub / github.com/dbcli/mycli / test_batch_file_open_error

Function test_batch_file_open_error

test/pytests/test_main_modes_batch.py:889–897  ·  view source on GitHub ↗
(monkeypatch)

Source from the content-addressed store, hash-verified

887
888
889def test_batch_file_open_error(monkeypatch) -> None:
890 mycli_main, _mycli_main_batch, MockMyCli = noninteractive_mock_mycli(monkeypatch)
891 runner = CliRunner()
892
893 result = runner.invoke(mycli_main.click_entrypoint, args=['--batch', 'definitely_missing_file.sql'])
894
895 assert result.exit_code != 0
896 assert 'Failed to open --batch file' in result.output
897 assert MockMyCli.ran_queries == []

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected