mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Change cmd_output_bs retcode arg to a boolean check
This commit is contained in:
parent
71925c47ea
commit
84b38f7b89
15 changed files with 28 additions and 26 deletions
|
|
@ -183,10 +183,11 @@ def test_error_handler_no_tty(tempdir_factory):
|
|||
'from pre_commit.error_handler import error_handler\n'
|
||||
'with error_handler():\n'
|
||||
' raise ValueError("\\u2603")\n',
|
||||
retcode=3,
|
||||
check=False,
|
||||
tempdir_factory=tempdir_factory,
|
||||
pre_commit_home=pre_commit_home,
|
||||
)
|
||||
assert ret == 3
|
||||
log_file = os.path.join(pre_commit_home, 'pre-commit.log')
|
||||
out_lines = out.splitlines()
|
||||
assert out_lines[-2] == 'An unexpected error has occurred: ValueError: ☃'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue