Skip to content

Commit

Permalink
test: add return code 2 check for non existent files
Browse files Browse the repository at this point in the history
  • Loading branch information
Nytelife26 committed Jul 3, 2021
1 parent 60c109d commit 787f380
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_config_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ def test_config_flag():
stderr=subprocess.PIPE, encoding='utf-8')
assert output.returncode == 1
assert "FileNotFoundError" in output.stderr

output = subprocess.run(["python", "-m", "proselint", "--config",
"tests/test_config_flag_proselintrc",
"non_existent_file"],
stderr=subprocess.PIPE, encoding='utf-8')
assert output.returncode == 2
assert "FileNotFoundError" in output.stderr

0 comments on commit 787f380

Please sign in to comment.