summaryrefslogtreecommitdiffstats
path: root/tests/error_handler_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/error_handler_test.py')
-rw-r--r--tests/error_handler_test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/error_handler_test.py b/tests/error_handler_test.py
index 47e2afa..a79d9c1 100644
--- a/tests/error_handler_test.py
+++ b/tests/error_handler_test.py
@@ -162,7 +162,7 @@ def test_error_handler_non_ascii_exception(mock_store_dir):
def test_error_handler_non_utf8_exception(mock_store_dir):
with pytest.raises(SystemExit):
with error_handler.error_handler():
- raise CalledProcessError(1, ('exe',), 0, b'error: \xa0\xe1', b'')
+ raise CalledProcessError(1, ('exe',), b'error: \xa0\xe1', b'')
def test_error_handler_non_stringable_exception(mock_store_dir):
@@ -183,10 +183,11 @@ def test_error_handler_no_tty(tempdir_factory):
'from pre_commit.error_handler import error_handler\n'
'with error_handler():\n'
' raise ValueError("\\u2603")\n',
- retcode=3,
+ check=False,
tempdir_factory=tempdir_factory,
pre_commit_home=pre_commit_home,
)
+ assert ret == 3
log_file = os.path.join(pre_commit_home, 'pre-commit.log')
out_lines = out.splitlines()
assert out_lines[-2] == 'An unexpected error has occurred: ValueError: ☃'