From a56cfe97b4d8f39197b9993f67d5deb228194bf1 2014-05-16 16:17:12 From: Thomas Kluyver Date: 2014-05-16 16:17:12 Subject: [PATCH] Make test robust against differences in line endings git on Windows can change line endings on checkout, which was leading to a test failure. --- diff --git a/IPython/utils/tests/test_openpy.py b/IPython/utils/tests/test_openpy.py index 58d0ff2..d71ffb8 100644 --- a/IPython/utils/tests/test_openpy.py +++ b/IPython/utils/tests/test_openpy.py @@ -24,8 +24,8 @@ def test_read_file(): def test_source_to_unicode(): with io.open(nonascii_path, 'rb') as f: source_bytes = f.read() - nt.assert_equal(openpy.source_to_unicode(source_bytes, skip_encoding_cookie=False), - source_bytes.decode('iso-8859-5')) + nt.assert_equal(openpy.source_to_unicode(source_bytes, skip_encoding_cookie=False).splitlines(), + source_bytes.decode('iso-8859-5').splitlines()) source_no_cookie = openpy.source_to_unicode(source_bytes, skip_encoding_cookie=True) nt.assert_not_in(u'coding: iso-8859-5', source_no_cookie)