Skip to content

Commit

Permalink
Merge pull request #57 from jaraco/bugfix/56-windows-failures
Browse files Browse the repository at this point in the history
Mark Windows tests as failing
  • Loading branch information
jaraco authored Feb 19, 2024
2 parents 67eef3a + 8934832 commit 9cb3091
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,15 @@ def test_wrong_encoding_detection_latin(self):
assert self.row1 == next(records)
assert self.row2 == next(records)

@pytest.mark.xfail("platform.system() == 'Windows'", reason="#56")
def test_bytes_encoding_detection_windows(self):
"""Test for detecting the encoding of a windows-1252 bytes file"""
filepath = p.join(io.DATA_DIR, "windows1252.csv")
records = io.read_csv(filepath, mode="rb")
assert self.row1 == next(records)
assert self.row4 == next(records)

@pytest.mark.xfail("platform.system() == 'Windows'", reason="#56")
def test_wrong_encoding_detection_windows(self):
"""Test for detecting the encoding of a windows file opened in ascii"""
filepath = p.join(io.DATA_DIR, "windows1252.csv")
Expand Down Expand Up @@ -360,6 +362,7 @@ def test_get_reader(self): # pylint: disable=R0201
with pytest.raises(KeyError):
io.get_reader("")

@pytest.mark.xfail("platform.system() == 'Windows'", reason="#56")
def test_opened_files(self):
"""Test for reading open files"""
filepath = p.join(io.DATA_DIR, "test.csv")
Expand Down Expand Up @@ -398,6 +401,7 @@ def test_opened_files(self):
finally:
f.close()

@pytest.mark.xfail("platform.system() == 'Windows'", reason="#56")
def test_reencode(self):
file_ = p.join(io.DATA_DIR, "utf16_big.csv")

Expand All @@ -416,6 +420,7 @@ def setup_method(self):
self.utf8_row = {"a": "4", "b": "5", "c": "ʤ"}
self.latin_row = {"a": "4", "b": "5", "c": "©"}

@pytest.mark.xfail("platform.system() == 'Windows'", reason="#56")
def test_urlopen_utf8(self):
"""Test for reading utf-8 files"""
filepath = p.join(io.DATA_DIR, "utf8.csv")
Expand All @@ -426,6 +431,7 @@ def test_urlopen_utf8(self):
row = next(it.islice(records, 1, 2))
assert self.utf8_row == row

@pytest.mark.xfail("platform.system() == 'Windows'", reason="#56")
def test_urlopen_latin1(self):
"""Test for reading latin-1 files"""
filepath = p.join(io.DATA_DIR, "latin1.csv")
Expand Down

0 comments on commit 9cb3091

Please sign in to comment.