Kaydet (Commit) 0950e6ae authored tarafından Martin Panter's avatar Martin Panter

Issue #22854: Skip pipe seek tests on Windows

üst 754aab28
......@@ -424,8 +424,6 @@ class IOTest(unittest.TestCase):
self.assertEqual(obj.readable(), readable)
writable = "w" in abilities
self.assertEqual(obj.writable(), writable)
seekable = "s" in abilities
self.assertEqual(obj.seekable(), seekable)
if isinstance(obj, self.TextIOBase):
data = "3"
......@@ -451,6 +449,13 @@ class IOTest(unittest.TestCase):
else:
self.assertRaises(OSError, obj.write, data)
if sys.platform.startswith("win") or test in (
pipe_reader, pipe_writer):
# Pipes seem to appear as seekable on Windows
continue
seekable = "s" in abilities
self.assertEqual(obj.seekable(), seekable)
if seekable:
obj.tell()
obj.seek(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment