Skip to content

Commit 122ddeb

Browse files
fanninpmyouknowone
authored andcommitted
Clean up skips in test_gzip
1 parent a320078 commit 122ddeb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Lib/test/test_gzip.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ def test_write_read_with_pathlike_file(self):
8888
self.assertEqual(d, data1 * 51)
8989
self.assertIsInstance(f.name, str)
9090

91+
# TODO: RUSTPYTHON
92+
@unittest.expectedFailure
9193
# The following test_write_xy methods test that write accepts
9294
# the corresponding bytes-like object type as input
9395
# and that the data written equals bytes(xy) in all cases.
94-
@unittest.skip("TODO: RUSTPYTHON (memoryview.cast doesn't support shape= arg)")
9596
def test_write_memoryview(self):
9697
self.write_and_read_back(memoryview(data1 * 50))
9798
m = memoryview(bytes(range(256)))
@@ -687,7 +688,6 @@ def test_bad_params(self):
687688
with self.assertRaises(ValueError):
688689
gzip.open(self.filename, "rb", newline="\n")
689690

690-
@unittest.skip("TODO: RUSTPYTHON (io.TextIOWrapper doesn't support non-UTF8)")
691691
def test_encoding(self):
692692
# Test non-default encoding.
693693
uncompressed = data1.decode("ascii") * 50
@@ -700,8 +700,11 @@ def test_encoding(self):
700700
with gzip.open(self.filename, "rt", encoding="utf-16") as f:
701701
self.assertEqual(f.read(), uncompressed)
702702

703+
# TODO: RUSTPYTHON
704+
if sys.platform == "win32":
705+
test_encoding = unittest.expectedFailure(test_encoding)
706+
703707

704-
@unittest.skip("TODO: RUSTPYTHON (io.TextIOWrapper doesn't support errors= arg)")
705708
def test_encoding_error_handler(self):
706709
# Test with non-default encoding error handler.
707710
with gzip.open(self.filename, "wb") as f:
@@ -710,7 +713,8 @@ def test_encoding_error_handler(self):
710713
as f:
711714
self.assertEqual(f.read(), "foobar")
712715

713-
@unittest.skip("TODO: RUSTPYTHON (io.TextIOWrapper doesn't respect newline=)")
716+
# TODO: RUSTPYTHON
717+
@unittest.expectedFailure
714718
def test_newline(self):
715719
# Test with explicit newline (universal newline mode disabled).
716720
uncompressed = data1.decode("ascii") * 50

0 commit comments

Comments
 (0)