def test_unicode_open(self): """ Test unicode_open(filename, *args, **kwargs). """ unicode_text = u"""Polish: Ą Ł Ż Chinese: 倀 倁 倂 倃 倄 倅 倆 倇 倈 Musical Notes: ♬ ♫ ♯""" with utils.unicode_open('tests/files/unicode.txt') as f: opened_text = f.read() self.assertEqual(unicode_text, opened_text)
def test_unicode_open(self): """ Test unicode_open(filename, *args, **kwargs). """ unicode_text = u"""Polish: Ą Ł Ż Chinese: 倀 倁 倂 倃 倄 倅 倆 倇 倈 Musical Notes: ♬ ♫ ♯""" with utils.unicode_open('tests/files/unicode.txt') as f: opened_text = f.read() if sys.platform.startswith('win'): unicode_text = os.linesep.join([s for s in unicode_text.splitlines() if not s.isspace()]) self.assertEqual(unicode_text, opened_text)
def test_unicode_open(self): """ Test unicode_open(filename, *args, **kwargs). """ unicode_text = u"""Polish: Ą Ł Ż Chinese: 倀 倁 倂 倃 倄 倅 倆 倇 倈 Musical Notes: ♬ ♫ ♯""" with utils.unicode_open('tests/files/unicode.txt') as f: opened_text = f.read() if sys.platform.startswith('win'): unicode_text = os.linesep.join( [s for s in unicode_text.splitlines() if not s.isspace()]) self.assertEqual(unicode_text, opened_text)