Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0aab1d

Browse files
committed
Issue #22854: Skip pipe seekable() tests on Windows
1 parent 047f3b7 commit c0aab1d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_io.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,12 @@ class UnseekableWriter(self.MockUnseekableIO):
425425
writable = "w" in abilities
426426
self.assertEqual(obj.writable(), writable)
427427
seekable = "s" in abilities
428-
self.assertEqual(obj.seekable(), seekable)
428+
429+
# Detection of pipes being non-seekable does not seem to work
430+
# on Windows
431+
if not sys.platform.startswith("win") or test not in (
432+
pipe_reader, pipe_writer):
433+
self.assertEqual(obj.seekable(), seekable)
429434

430435
if isinstance(obj, self.TextIOBase):
431436
data = "3"

0 commit comments

Comments
 (0)