Skip to content

Commit ae3d0d0

Browse files
committed
TST: Add test for reading the zipped UTF-16 file
1 parent 973a2d8 commit ae3d0d0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pandas/tests/io/parser/common.py

+9
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,15 @@ def test_utf16_example(self):
750750
result = self.read_table(buf, encoding='utf-16')
751751
assert len(result) == 50
752752

753+
def test_compressed_utf16_example(self):
754+
path = tm.get_data_path('utf16_ex.zip')
755+
expected_path = tm.get_data_path('utf16_ex.txt')
756+
757+
result = self.read_table(path, encoding='utf-16', compression='zip')
758+
expected = self.read_table(expected_path, encoding='utf-16')
759+
760+
tm.assert_frame_equal(result, expected)
761+
753762
def test_unicode_encoding(self):
754763
pth = tm.get_data_path('unicode_series.csv')
755764

1.64 KB
Binary file not shown.

0 commit comments

Comments
 (0)