mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Tests pass on windows
This commit is contained in:
parent
56e5c4eb2d
commit
143ed94500
21 changed files with 224 additions and 109 deletions
|
|
@ -37,13 +37,13 @@ def test_error_handler_fatal_error(mocked_log_and_exit):
|
|||
)
|
||||
|
||||
assert re.match(
|
||||
'Traceback \(most recent call last\):\n'
|
||||
' File ".+/pre_commit/error_handler.py", line \d+, in error_handler\n'
|
||||
' yield\n'
|
||||
' File ".+/tests/error_handler_test.py", line \d+, '
|
||||
'in test_error_handler_fatal_error\n'
|
||||
' raise exc\n'
|
||||
'(pre_commit\.errors\.)?FatalError: just a test\n',
|
||||
r'Traceback \(most recent call last\):\n'
|
||||
r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
|
||||
r' yield\n'
|
||||
r' File ".+tests.error_handler_test.py", line \d+, '
|
||||
r'in test_error_handler_fatal_error\n'
|
||||
r' raise exc\n'
|
||||
r'(pre_commit\.errors\.)?FatalError: just a test\n',
|
||||
mocked_log_and_exit.call_args[0][2],
|
||||
)
|
||||
|
||||
|
|
@ -60,13 +60,13 @@ def test_error_handler_uncaught_error(mocked_log_and_exit):
|
|||
mock.ANY,
|
||||
)
|
||||
assert re.match(
|
||||
'Traceback \(most recent call last\):\n'
|
||||
' File ".+/pre_commit/error_handler.py", line \d+, in error_handler\n'
|
||||
' yield\n'
|
||||
' File ".+/tests/error_handler_test.py", line \d+, '
|
||||
'in test_error_handler_uncaught_error\n'
|
||||
' raise exc\n'
|
||||
'ValueError: another test\n',
|
||||
r'Traceback \(most recent call last\):\n'
|
||||
r' File ".+pre_commit.error_handler.py", line \d+, in error_handler\n'
|
||||
r' yield\n'
|
||||
r' File ".+tests.error_handler_test.py", line \d+, '
|
||||
r'in test_error_handler_uncaught_error\n'
|
||||
r' raise exc\n'
|
||||
r'ValueError: another test\n',
|
||||
mocked_log_and_exit.call_args[0][2],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue