Skip to content

Commit

Permalink
Add test for invalid modality in CLI to complete coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
auroracramer committed Nov 12, 2019
1 parent 01352ab commit 2f37ccb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,17 @@ def test_run(capsys):
assert captured.out == expected_message

# delete tempdir
os.rmdir(tempdir)
if os.path.exists(tempdir):
os.rmdir(tempdir)

# test invalid modality
with pytest.raises(SystemExit) as pytest_wrapped_e:
tempdir = tempfile.mkdtemp()
run('invalid', CHIRP_44K_PATH, output_dir=tempdir)

# delete tempdir
if os.path.exists(tempdir):
os.rmdir(tempdir)

# test correct execution on test audio file (regression)
tempdir = tempfile.mkdtemp()
Expand Down

0 comments on commit 2f37ccb

Please sign in to comment.