Fix up some newlines in output

This commit is contained in:
Anthony Sottile 2019-09-24 09:32:10 -07:00
parent cfc4910068
commit 795506a486
4 changed files with 39 additions and 36 deletions

View file

@ -113,19 +113,25 @@ def test_log_and_exit(cap_out, mock_store_dir):
logged = f.read()
expected = (
r'^### version information\n'
r'\n'
r'```\n'
r'pre-commit.version: \d+\.\d+\.\d+\n'
r'sys.version:\n( .*\n)*'
r'pre-commit version: \d+\.\d+\.\d+\n'
r'sys.version:\n'
r'( .*\n)*'
r'sys.executable: .*\n'
r'os.name: .*\n'
r'sys.platform: .*\n'
r'```\n'
r'\n'
r'### error information\n'
r'\n'
r'```\n'
r'msg: FatalError: hai\n'
r"I'm a stacktrace\n"
r'```\n'
r'\n'
r'```\n'
r"I'm a stacktrace\n"
r'```\n'
)
assert re.match(expected, logged)

View file

@ -24,7 +24,7 @@ def test_CalledProcessError_str():
'Output: \n'
' stdout\n'
'Errors: \n'
' stderr\n'
' stderr'
)
@ -37,7 +37,7 @@ def test_CalledProcessError_str_nooutput():
'Return code: 1\n'
'Expected return code: 0\n'
'Output: (none)\n'
'Errors: (none)\n'
'Errors: (none)'
)