MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_open_pipe_with_append

Method test_open_pipe_with_append

Lib/test/test_io.py:4433–4442  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4431
4432 @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
4433 def test_open_pipe_with_append(self):
4434 # bpo-27805: Ignore ESPIPE from lseek() in open().
4435 r, w = os.pipe()
4436 self.addCleanup(os.close, r)
4437 f = self.open(w, 'a', encoding="utf-8")
4438 self.addCleanup(f.close)
4439 # Check that the file is marked non-seekable. On Windows, however, lseek
4440 # somehow succeeds on pipes.
4441 if sys.platform != 'win32':
4442 self.assertFalse(f.seekable())
4443
4444 def test_io_after_close(self):
4445 for kwargs in [

Callers

nothing calls this directly

Calls 5

addCleanupMethod · 0.80
assertFalseMethod · 0.80
pipeMethod · 0.45
openMethod · 0.45
seekableMethod · 0.45

Tested by

no test coverage detected