[Tests, Windows] fix tests that was failing on Windows due to linebreak issues

This commit is contained in:
MinchinWeb 2019-08-02 11:00:23 -06:00
parent 4cc74fed36
commit 1e40cdef06
2 changed files with 5 additions and 1 deletions

View file

@ -190,6 +190,9 @@ def check_output_time_inline(context, text):
def check_output_inline(context, text=None):
text = text or context.text
out = context.stdout_capture.getvalue()
# make line endings consistent
text = os.linesep.join(text.splitlines())
out = os.linesep.join(out.splitlines())
if isinstance(out, bytes):
out = out.decode('utf-8')
assert text in out, text