(monkeypatch, contents: str, extra_args: list[str], expected_queries: list[str], expected_progress)
| 837 | ), |
| 838 | ) |
| 839 | def 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 | |
| 855 | def test_click_batch_file_skips_checkpoint_prefix(monkeypatch, tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected