mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Fix the exit code argument position
This commit is contained in:
parent
6ab01430fb
commit
82216596f2
1 changed files with 3 additions and 3 deletions
|
|
@ -32,10 +32,10 @@ def test_error_handler_fatal_error(mocked_log_and_exit):
|
||||||
|
|
||||||
mocked_log_and_exit.assert_called_once_with(
|
mocked_log_and_exit.assert_called_once_with(
|
||||||
'An error has occurred',
|
'An error has occurred',
|
||||||
|
1,
|
||||||
exc,
|
exc,
|
||||||
# Tested below
|
# Tested below
|
||||||
mock.ANY,
|
mock.ANY,
|
||||||
1,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
pattern = re_assert.Matches(
|
pattern = re_assert.Matches(
|
||||||
|
|
@ -57,10 +57,10 @@ def test_error_handler_uncaught_error(mocked_log_and_exit):
|
||||||
|
|
||||||
mocked_log_and_exit.assert_called_once_with(
|
mocked_log_and_exit.assert_called_once_with(
|
||||||
'An unexpected error has occurred',
|
'An unexpected error has occurred',
|
||||||
|
3,
|
||||||
exc,
|
exc,
|
||||||
# Tested below
|
# Tested below
|
||||||
mock.ANY,
|
mock.ANY,
|
||||||
3,
|
|
||||||
)
|
)
|
||||||
pattern = re_assert.Matches(
|
pattern = re_assert.Matches(
|
||||||
r'Traceback \(most recent call last\):\n'
|
r'Traceback \(most recent call last\):\n'
|
||||||
|
|
@ -81,10 +81,10 @@ def test_error_handler_keyboardinterrupt(mocked_log_and_exit):
|
||||||
|
|
||||||
mocked_log_and_exit.assert_called_once_with(
|
mocked_log_and_exit.assert_called_once_with(
|
||||||
'Interrupted (^C)',
|
'Interrupted (^C)',
|
||||||
|
130,
|
||||||
exc,
|
exc,
|
||||||
# Tested below
|
# Tested below
|
||||||
mock.ANY,
|
mock.ANY,
|
||||||
130,
|
|
||||||
)
|
)
|
||||||
pattern = re_assert.Matches(
|
pattern = re_assert.Matches(
|
||||||
r'Traceback \(most recent call last\):\n'
|
r'Traceback \(most recent call last\):\n'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue