diff --git a/IPython/testing/tools.py b/IPython/testing/tools.py index 48a2869..d1c7c43 100644 --- a/IPython/testing/tools.py +++ b/IPython/testing/tools.py @@ -240,7 +240,7 @@ def ipexec_validate(fname, expected_out, expected_err='', raise ValueError('Running file %r produced error: %r' % (fname, err)) # If no errors or output on stderr was expected, match stdout - nt.assert_equal(out.strip(), expected_out.strip()) + nt.assert_equal("\n".join(out.strip().splitlines()), "\n".join(expected_out.strip().splitlines())) class TempFileMixin(object):