From 787f3806880b8e376c3f068637c093bc42e87e3e Mon Sep 17 00:00:00 2001 From: Nytelife26 Date: Sat, 3 Jul 2021 16:32:27 +0100 Subject: [PATCH] test: add return code 2 check for non existent files --- tests/test_config_flag.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_config_flag.py b/tests/test_config_flag.py index c8dcd0fcb..5fe59239f 100644 --- a/tests/test_config_flag.py +++ b/tests/test_config_flag.py @@ -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