@@ -45,9 +45,11 @@ def test_error_handler_fatal_error(mocked_log_and_exit):
4545 r'Traceback \(most recent call last\):\n'
4646 r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
4747 r' yield\n'
48+ r'( \^\^\^\^\^\n)?'
4849 r' File ".+tests.error_handler_test.py", line \d+, '
4950 r'in test_error_handler_fatal_error\n'
5051 r' raise exc\n'
52+ r'( \^\^\^\^\^\^\^\^\^\n)?'
5153 r'(pre_commit\.errors\.)?FatalError: just a test\n' ,
5254 )
5355 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):
6971 r'Traceback \(most recent call last\):\n'
7072 r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
7173 r' yield\n'
74+ r'( \^\^\^\^\^\n)?'
7275 r' File ".+tests.error_handler_test.py", line \d+, '
7376 r'in test_error_handler_uncaught_error\n'
7477 r' raise exc\n'
78+ r'( \^\^\^\^\^\^\^\^\^\n)?'
7579 r'ValueError: another test\n' ,
7680 )
7781 pattern .assert_matches (mocked_log_and_exit .call_args [0 ][3 ])
@@ -93,9 +97,11 @@ def test_error_handler_keyboardinterrupt(mocked_log_and_exit):
9397 r'Traceback \(most recent call last\):\n'
9498 r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
9599 r' yield\n'
100+ r'( \^\^\^\^\^\n)?'
96101 r' File ".+tests.error_handler_test.py", line \d+, '
97102 r'in test_error_handler_keyboardinterrupt\n'
98103 r' raise exc\n'
104+ r'( \^\^\^\^\^\^\^\^\^\n)?'
99105 r'KeyboardInterrupt\n' ,
100106 )
101107 pattern .assert_matches (mocked_log_and_exit .call_args [0 ][3 ])
0 commit comments