mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
Update the error handling tests with exit codes
This commit is contained in:
parent
4fc2344a72
commit
544e941b27
1 changed files with 3 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ def test_error_handler_fatal_error(mocked_log_and_exit):
|
|||
exc,
|
||||
# Tested below
|
||||
mock.ANY,
|
||||
1,
|
||||
)
|
||||
|
||||
assert re.match(
|
||||
|
|
@ -56,6 +57,7 @@ def test_error_handler_uncaught_error(mocked_log_and_exit):
|
|||
exc,
|
||||
# Tested below
|
||||
mock.ANY,
|
||||
3,
|
||||
)
|
||||
assert re.match(
|
||||
r'Traceback \(most recent call last\):\n'
|
||||
|
|
@ -79,6 +81,7 @@ def test_error_handler_keyboardinterrupt(mocked_log_and_exit):
|
|||
exc,
|
||||
# Tested below
|
||||
mock.ANY,
|
||||
130,
|
||||
)
|
||||
assert re.match(
|
||||
r'Traceback \(most recent call last\):\n'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue