Skip to content

Commit b87b789

Browse files
committed
Run restored StringIO conformance tests
Constraint: upstream StringIO tests already cover the repaired behavior. Rejected: new RustPython-only regression tests | existing CPython coverage is sufficient. Confidence: high Scope-risk: narrow Directive: Remove expected-failure markers only while the inherited tests pass. Tested: prek run --all-files; test_memoryio; test_email Assisted-by: Codex:gpt-5.6-sol
1 parent 72b0543 commit b87b789

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

‎Lib/test/test_memoryio.py‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,6 @@ class CStringIOTest(PyStringIOTest):
940940

941941
# XXX: For the Python version of io.StringIO, this is highly
942942
# dependent on the encoding used for the underlying buffer.
943-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 8 != 2
944943
def test_widechar(self):
945944
buf = self.buftype("\U0002030a\U00020347")
946945
memio = self.ioclass(buf)
@@ -965,7 +964,6 @@ def test_getstate(self):
965964
memio.close()
966965
self.assertRaises(ValueError, memio.__getstate__)
967966

968-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: ValueError not raised by __setstate__
969967
def test_setstate(self):
970968
# This checks whether __setstate__ does proper input validation.
971969
memio = self.ioclass()
@@ -1006,18 +1004,10 @@ def __str__(self):
10061004
def test_issue5265(self):
10071005
return super().test_issue5265()
10081006

1009-
@unittest.expectedFailure # TODO: RUSTPYTHON; ? ++++
1010-
def test_newline_empty(self):
1011-
return super().test_newline_empty()
1012-
10131007
@unittest.expectedFailure # TODO: RUSTPYTHON; ? ^^^^^
10141008
def test_newline_none(self):
10151009
return super().test_newline_none()
10161010

1017-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: OSError not raised by seek
1018-
def test_relative_seek(self):
1019-
return super().test_relative_seek()
1020-
10211011
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: ValueError not raised by writable
10221012
def test_flags(self):
10231013
return super().test_flags()
@@ -1048,18 +1038,10 @@ def __init__(self, *args, **kwargs):
10481038
def test_issue5265(self):
10491039
return super().test_issue5265()
10501040

1051-
@unittest.expectedFailure # TODO: RUSTPYTHON; ? ++++
1052-
def test_newline_empty(self):
1053-
return super().test_newline_empty()
1054-
10551041
@unittest.expectedFailure # TODO: RUSTPYTHON; ? ^^^^^
10561042
def test_newline_none(self):
10571043
return super().test_newline_none()
10581044

1059-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: OSError not raised by seek
1060-
def test_relative_seek(self):
1061-
return super().test_relative_seek()
1062-
10631045
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'StringIO' object has no attribute 'newlines'. Did you mean: 'readlines'?
10641046
def test_newlines_property(self):
10651047
return super().test_newlines_property()

0 commit comments

Comments
 (0)