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

Function test_click_batch_file_modes

test/pytests/test_main_modes_batch.py:839–852  ·  view source on GitHub ↗
(monkeypatch, contents: str, extra_args: list[str], expected_queries: list[str], expected_progress)

Source from the content-addressed store, hash-verified

837 ),
838)
839def test_click_batch_file_modes(monkeypatch, contents: str, extra_args: list[str], expected_queries: list[str], expected_progress) -> None:
840 mycli_main, mycli_main_batch, MockMyCli = noninteractive_mock_mycli(monkeypatch)
841 runner = CliRunner()
842 MockMyCli.ran_queries = []
843
844 if '--progress' in extra_args:
845 patch_progress_mode(monkeypatch, mycli_main, mycli_main_batch)
846
847 result, _batch_file_name = invoke_click_batch(runner, mycli_main, contents, extra_args)
848
849 assert result.exit_code == 0
850 assert MockMyCli.ran_queries == expected_queries
851 if expected_progress is not None:
852 assert DummyProgressBar.calls == expected_progress
853
854
855def test_click_batch_file_skips_checkpoint_prefix(monkeypatch, tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 3

patch_progress_modeFunction · 0.85
invoke_click_batchFunction · 0.85

Tested by

no test coverage detected