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

Skip to content

Commit 0950e6a

Browse files
committed
Issue #22854: Skip pipe seek tests on Windows
1 parent 754aab2 commit 0950e6a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Lib/test/test_io.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ class UnseekableWriter(self.MockUnseekableIO):
424424
self.assertEqual(obj.readable(), readable)
425425
writable = "w" in abilities
426426
self.assertEqual(obj.writable(), writable)
427-
seekable = "s" in abilities
428-
self.assertEqual(obj.seekable(), seekable)
429427

430428
if isinstance(obj, self.TextIOBase):
431429
data = "3"
@@ -451,6 +449,13 @@ class UnseekableWriter(self.MockUnseekableIO):
451449
else:
452450
self.assertRaises(OSError, obj.write, data)
453451

452+
if sys.platform.startswith("win") or test in (
453+
pipe_reader, pipe_writer):
454+
# Pipes seem to appear as seekable on Windows
455+
continue
456+
seekable = "s" in abilities
457+
self.assertEqual(obj.seekable(), seekable)
458+
454459
if seekable:
455460
obj.tell()
456461
obj.seek(0)

0 commit comments

Comments
 (0)