summaryrefslogtreecommitdiffstats
path: root/tests/error_handler_test.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-14 13:16:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-14 13:16:23 +0000
commiteebab08ecd6c247fa464f40934f852d63daba9bb (patch)
treeab61e7678c576d3489623464241ec67faf455964 /tests/error_handler_test.py
parentReleasing debian version 2.19.0-1. (diff)
downloadpre-commit-eebab08ecd6c247fa464f40934f852d63daba9bb.tar.xz
pre-commit-eebab08ecd6c247fa464f40934f852d63daba9bb.zip
Merging upstream version 2.20.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/error_handler_test.py')
-rw-r--r--tests/error_handler_test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/error_handler_test.py b/tests/error_handler_test.py
index 31c71d2..47e2afa 100644
--- a/tests/error_handler_test.py
+++ b/tests/error_handler_test.py
@@ -45,9 +45,11 @@ def test_error_handler_fatal_error(mocked_log_and_exit):
r'Traceback \(most recent call last\):\n'
r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
r' yield\n'
+ r'( \^\^\^\^\^\n)?'
r' File ".+tests.error_handler_test.py", line \d+, '
r'in test_error_handler_fatal_error\n'
r' raise exc\n'
+ r'( \^\^\^\^\^\^\^\^\^\n)?'
r'(pre_commit\.errors\.)?FatalError: just a test\n',
)
pattern.assert_matches(mocked_log_and_exit.call_args[0][3])
@@ -69,9 +71,11 @@ def test_error_handler_uncaught_error(mocked_log_and_exit):
r'Traceback \(most recent call last\):\n'
r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
r' yield\n'
+ r'( \^\^\^\^\^\n)?'
r' File ".+tests.error_handler_test.py", line \d+, '
r'in test_error_handler_uncaught_error\n'
r' raise exc\n'
+ r'( \^\^\^\^\^\^\^\^\^\n)?'
r'ValueError: another test\n',
)
pattern.assert_matches(mocked_log_and_exit.call_args[0][3])
@@ -93,9 +97,11 @@ def test_error_handler_keyboardinterrupt(mocked_log_and_exit):
r'Traceback \(most recent call last\):\n'
r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
r' yield\n'
+ r'( \^\^\^\^\^\n)?'
r' File ".+tests.error_handler_test.py", line \d+, '
r'in test_error_handler_keyboardinterrupt\n'
r' raise exc\n'
+ r'( \^\^\^\^\^\^\^\^\^\n)?'
r'KeyboardInterrupt\n',
)
pattern.assert_matches(mocked_log_and_exit.call_args[0][3])