Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Unmark passing tests
  • Loading branch information
ShaharNaveh committed Sep 15, 2025
commit 86688015f09408feb6d2ba6ad6d412b7c2e8b05c
9 changes: 0 additions & 9 deletions Lib/test/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,6 @@ def test_only_one_bom(self):
f = reader(s)
self.assertEqual(f.read(), "spamspam")

@unittest.expectedFailure # TODO: RUSTPYTHON;; UTF-16 stream does not start with BOM
def test_badbom(self):
s = io.BytesIO(b"\xff\xff")
f = codecs.getreader(self.encoding)(s)
Expand Down Expand Up @@ -1509,7 +1508,6 @@ def test_decode(self):
puny = puny.decode("ascii").encode("ascii")
self.assertEqual(uni, puny.decode("punycode"))

@unittest.expectedFailure # TODO: RUSTPYTHON; b'Pro\xffprostnemluvesky' != b'Pro\xffprostnemluvesky-uyb24dma41a'
def test_decode_invalid(self):
testcases = [
(b"xn--w&", "strict", UnicodeDecodeError("punycode", b"", 5, 6, "")),
Expand Down Expand Up @@ -1694,7 +1692,6 @@ def test_decode_invalid(self):


class NameprepTest(unittest.TestCase):
@unittest.expectedFailure # TODO: RUSTPYTHON; UnicodeError: Invalid character '\u1680'
def test_nameprep(self):
from encodings.idna import nameprep
for pos, (orig, prepped) in enumerate(nameprep_tests):
Expand Down Expand Up @@ -1732,7 +1729,6 @@ class IDNACodecTest(unittest.TestCase):
("あさ.\u034f", UnicodeEncodeError("idna", "あさ.\u034f", 3, 4, "")),
]

@unittest.expectedFailure # TODO: RUSTPYTHON; 'XN--pythn-mua.org.' != 'pythön.org.'
def test_builtin_decode(self):
self.assertEqual(str(b"python.org", "idna"), "python.org")
self.assertEqual(str(b"python.org.", "idna"), "python.org.")
Expand All @@ -1746,7 +1742,6 @@ def test_builtin_decode(self):
self.assertEqual(str(b"bugs.XN--pythn-mua.org.", "idna"),
"bugs.pyth\xf6n.org.")

@unittest.expectedFailure # TODO: RUSTPYTHON; 'ascii' != 'idna'
def test_builtin_decode_invalid(self):
for case, expected in self.invalid_decode_testcases:
with self.subTest(case=case, expected=expected):
Expand All @@ -1764,7 +1759,6 @@ def test_builtin_encode(self):
self.assertEqual("pyth\xf6n.org".encode("idna"), b"xn--pythn-mua.org")
self.assertEqual("pyth\xf6n.org.".encode("idna"), b"xn--pythn-mua.org.")

@unittest.expectedFailure # TODO: RUSTPYTHON; UnicodeError: label empty or too long
def test_builtin_encode_invalid(self):
for case, expected in self.invalid_encode_testcases:
with self.subTest(case=case, expected=expected):
Expand All @@ -1776,7 +1770,6 @@ def test_builtin_encode_invalid(self):
self.assertEqual(exc.start, expected.start)
self.assertEqual(exc.end, expected.end)

@unittest.expectedFailure # TODO: RUSTPYTHON; UnicodeError: label empty or too long
def test_builtin_decode_length_limit(self):
with self.assertRaisesRegex(UnicodeDecodeError, "way too long"):
(b"xn--016c"+b"a"*1100).decode("idna")
Expand Down Expand Up @@ -1818,7 +1811,6 @@ def test_incremental_decode(self):
self.assertEqual(decoder.decode(b"rg."), "org.")
self.assertEqual(decoder.decode(b"", True), "")

@unittest.expectedFailure # TODO: RUSTPYTHON; 'ascii' != 'idna'
def test_incremental_decode_invalid(self):
iterdecode_testcases = [
(b"\xFFpython.org", UnicodeDecodeError("idna", b"\xFF", 0, 1, "")),
Expand Down Expand Up @@ -1880,7 +1872,6 @@ def test_incremental_encode(self):
self.assertEqual(encoder.encode("ample.org."), b"xn--xample-9ta.org.")
self.assertEqual(encoder.encode("", True), b"")

@unittest.expectedFailure # TODO: RUSTPYTHON; UnicodeError: label empty or too long
def test_incremental_encode_invalid(self):
iterencode_testcases = [
(f"foo.{'\xff'*60}", UnicodeEncodeError("idna", f"{'\xff'*60}", 0, 60, "")),
Expand Down
Loading