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)