##// END OF EJS Templates
Make test robust against differences in line endings...
Thomas Kluyver -
Show More
@@ -24,8 +24,8 b' def test_read_file():'
24 def test_source_to_unicode():
24 def test_source_to_unicode():
25 with io.open(nonascii_path, 'rb') as f:
25 with io.open(nonascii_path, 'rb') as f:
26 source_bytes = f.read()
26 source_bytes = f.read()
27 nt.assert_equal(openpy.source_to_unicode(source_bytes, skip_encoding_cookie=False),
27 nt.assert_equal(openpy.source_to_unicode(source_bytes, skip_encoding_cookie=False).splitlines(),
28 source_bytes.decode('iso-8859-5'))
28 source_bytes.decode('iso-8859-5').splitlines())
29
29
30 source_no_cookie = openpy.source_to_unicode(source_bytes, skip_encoding_cookie=True)
30 source_no_cookie = openpy.source_to_unicode(source_bytes, skip_encoding_cookie=True)
31 nt.assert_not_in(u'coding: iso-8859-5', source_no_cookie)
31 nt.assert_not_in(u'coding: iso-8859-5', source_no_cookie)
General Comments 0
You need to be logged in to leave comments. Login now