Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
unmark sucessful tests
  • Loading branch information
youknowone committed Dec 28, 2025
commit 083dafb02d6295ba688373f2bbfead6ea4e14b5e
29 changes: 24 additions & 5 deletions Lib/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,22 @@ def test_RawIOBase_read(self):
self.assertEqual(rawio.read(2), None)
self.assertEqual(rawio.read(2), b"")

def test_RawIOBase_read_bounds_checking(self):
# Make sure a `.readinto` call which returns a value outside
# (0, len(buffer)) raises.
class Misbehaved(self.RawIOBase):
def __init__(self, readinto_return) -> None:
self._readinto_return = readinto_return
def readinto(self, b):
return self._readinto_return

with self.assertRaises(ValueError) as cm:
Misbehaved(2).read(1)
self.assertEqual(str(cm.exception), "readinto returned 2 outside buffer size 1")
for bad_size in (2147483647, sys.maxsize, -1, -1000):
with self.assertRaises(ValueError):
Misbehaved(bad_size).read()

def test_types_have_dict(self):
test = (
self.IOBase(),
Expand Down Expand Up @@ -1819,7 +1835,6 @@ def test_bad_readinto_value(self):
bufio.readline()
self.assertIsNone(cm.exception.__cause__)

@unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: 'bytes' object cannot be interpreted as an integer")
def test_bad_readinto_type(self):
rawio = self.tp(self.BytesIO(b"12"))
rawio.readinto = lambda buf: b''
Expand Down Expand Up @@ -1955,7 +1970,6 @@ def _seekrel(bufio):
def test_writes_and_truncates(self):
self.check_writes(lambda bufio: bufio.truncate(bufio.tell()))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_write_non_blocking(self):
raw = self.MockNonBlockWriterIO()
bufio = self.tp(raw, 8)
Expand Down Expand Up @@ -4281,7 +4295,6 @@ def test_reconfigure_write_through(self):
def test_repr(self):
return super().test_repr()

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_uninitialized(self):
return super().test_uninitialized()

Expand Down Expand Up @@ -4654,14 +4667,12 @@ def test_pickling(self):
with self.assertRaisesRegex(TypeError, msg):
pickle.dumps(f, protocol)

@unittest.expectedFailure # TODO: RUSTPYTHON
@unittest.skipIf(
support.is_emscripten, "fstat() of a pipe fd is not supported"
)
def test_nonblock_pipe_write_bigbuf(self):
self._test_nonblock_pipe_write(16*1024)

@unittest.expectedFailure # TODO: RUSTPYTHON
@unittest.skipIf(
support.is_emscripten, "fstat() of a pipe fd is not supported"
)
Expand Down Expand Up @@ -4825,6 +4836,14 @@ class CMiscIOTest(MiscIOTest):
name_of_module = "io", "_io"
extra_exported = "BlockingIOError",

@unittest.expectedFailure # TODO: RUSTPYTHON; BufferedWriter seeks on non-seekable pipe
def test_nonblock_pipe_write_bigbuf(self):
return super().test_nonblock_pipe_write_bigbuf()

@unittest.expectedFailure # TODO: RUSTPYTHON; BufferedWriter seeks on non-seekable pipe
def test_nonblock_pipe_write_smallbuf(self):
return super().test_nonblock_pipe_write_smallbuf()

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_warn_on_dealloc(self):
return super().test_warn_on_dealloc()
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1554,8 +1554,6 @@ def test_communicate_epipe_only_stdin(self):
p.wait()
p.communicate(b"x" * 2**20)

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.skipUnless(hasattr(signal, 'SIGUSR1'),
"Requires signal.SIGUSR1")
@unittest.skipUnless(hasattr(os, 'kill'),
Expand Down
4 changes: 0 additions & 4 deletions Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,19 +1050,15 @@ def _test_sparse_file(self, name):
s = os.stat(filename)
self.assertLess(s.st_blocks * 512, s.st_size)

@unittest.expectedFailureIf(sys.platform == "linux", "TODO: RUSTPYTHON")
def test_sparse_file_old(self):
self._test_sparse_file("gnu/sparse")

@unittest.expectedFailureIf(sys.platform == "linux", "TODO: RUSTPYTHON")
def test_sparse_file_00(self):
self._test_sparse_file("gnu/sparse-0.0")

@unittest.expectedFailureIf(sys.platform == "linux", "TODO: RUSTPYTHON")
def test_sparse_file_01(self):
self._test_sparse_file("gnu/sparse-0.1")

@unittest.expectedFailureIf(sys.platform == "linux", "TODO: RUSTPYTHON")
def test_sparse_file_10(self):
self._test_sparse_file("gnu/sparse-1.0")

Expand Down