Update the error handling tests with exit codes

This commit is contained in:
int3l 2020-09-16 23:18:38 +03:00 committed by GitHub
parent 4fc2344a72
commit 544e941b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,6 +32,7 @@ def test_error_handler_fatal_error(mocked_log_and_exit):
exc, exc,
# Tested below # Tested below
mock.ANY, mock.ANY,
1,
) )
assert re.match( assert re.match(
@ -56,6 +57,7 @@ def test_error_handler_uncaught_error(mocked_log_and_exit):
exc, exc,
# Tested below # Tested below
mock.ANY, mock.ANY,
3,
) )
assert re.match( assert re.match(
r'Traceback \(most recent call last\):\n' r'Traceback \(most recent call last\):\n'
@ -79,6 +81,7 @@ def test_error_handler_keyboardinterrupt(mocked_log_and_exit):
exc, exc,
# Tested below # Tested below
mock.ANY, mock.ANY,
130,
) )
assert re.match( assert re.match(
r'Traceback \(most recent call last\):\n' r'Traceback \(most recent call last\):\n'