diff options
Diffstat (limited to 'lib/project/tests')
| -rw-r--r-- | lib/project/tests/test_cli.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/project/tests/test_cli.py b/lib/project/tests/test_cli.py index e02aad1..05c8292 100644 --- a/lib/project/tests/test_cli.py +++ b/lib/project/tests/test_cli.py @@ -176,6 +176,22 @@ def test_default_outputs_are_written_beside_each_input(wav, tmp_path, ffmpeg, in assert captured.err.count("Written:") == 2 +def test_process_keyword_is_optional(wav, tmp_path, ffmpeg, invoke, capsys): + source = wav() + original = source.read_bytes() + invoke(source, "--no-denoise") + assert {path.name for path in tmp_path.iterdir()} == { + "input.wav", "input.natural.wav", "logs"} + assert source.read_bytes() == original + assert capsys.readouterr().err.count("Written:") == 1 + + +def test_leading_flag_still_selects_process(wav, tmp_path, ffmpeg, invoke, capsys): + source = wav() + invoke("--no-denoise", source) + assert (tmp_path / "input.natural.wav").exists() + + def test_output_and_output_dir_cannot_be_combined(wav, tmp_path, invoke, capsys): with pytest.raises(SystemExit) as error: invoke("process", wav(), "-o", tmp_path / "x.wav", "--output-dir", tmp_path / "outs") |
