MCPcopy Index your code
hub / github.com/python/cpython / test_open_pipe_with_append

Method test_open_pipe_with_append

Lib/test/test_io/test_general.py:1018–1027  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1016
1017 @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
1018 def test_open_pipe_with_append(self):
1019 # bpo-27805: Ignore ESPIPE from lseek() in open().
1020 r, w = os.pipe()
1021 self.addCleanup(os.close, r)
1022 f = self.open(w, 'a', encoding="utf-8")
1023 self.addCleanup(f.close)
1024 # Check that the file is marked non-seekable. On Windows, however, lseek
1025 # somehow succeeds on pipes.
1026 if sys.platform != 'win32':
1027 self.assertFalse(f.seekable())
1028
1029 def test_io_after_close(self):
1030 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