]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #22854: Skip pipe seek tests on Windows
authorMartin Panter <vadmium+py@gmail.com>
Thu, 31 Mar 2016 10:31:30 +0000 (10:31 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Thu, 31 Mar 2016 10:31:30 +0000 (10:31 +0000)
Lib/test/test_io.py

index 51c250b40b290633b14a72dc7f3ead473501f8d7..f3b33f238087e3916676c1f07f35ef56cf251a60 100644 (file)
@@ -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)