mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Use SystemExit instead of PreCommitSystemExit
This commit is contained in:
parent
3f7e715c20
commit
a9e1940f7e
3 changed files with 4 additions and 10 deletions
|
|
@ -75,7 +75,7 @@ def test_error_handler_uncaught_error(mocked_log_and_exit):
|
|||
|
||||
|
||||
def test_log_and_exit(cap_out, mock_out_store_directory):
|
||||
with pytest.raises(error_handler.PreCommitSystemExit):
|
||||
with pytest.raises(SystemExit):
|
||||
error_handler._log_and_exit(
|
||||
'msg', FatalError('hai'), "I'm a stacktrace",
|
||||
)
|
||||
|
|
@ -96,7 +96,7 @@ def test_log_and_exit(cap_out, mock_out_store_directory):
|
|||
|
||||
|
||||
def test_error_handler_non_ascii_exception(mock_out_store_directory):
|
||||
with pytest.raises(error_handler.PreCommitSystemExit):
|
||||
with pytest.raises(SystemExit):
|
||||
with error_handler.error_handler():
|
||||
raise ValueError('☃')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue