diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-04 07:22:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-04 07:22:28 +0000 |
commit | 2e8bfde15d76ad56da2d1bbd99294dafd4e4372f (patch) | |
tree | 8baa02378416532628cbe6a7c3790954a7953dfd /tests/error_handler_test.py | |
parent | Releasing debian version 2.20.0-2. (diff) | |
download | pre-commit-2e8bfde15d76ad56da2d1bbd99294dafd4e4372f.tar.xz pre-commit-2e8bfde15d76ad56da2d1bbd99294dafd4e4372f.zip |
Merging upstream version 2.21.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/error_handler_test.py | 5 |
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: ☃' |