]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #22854: Skip pipe seekable() 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 1944a04573330d1f93a266795880b8c4652c8061..9c410e7a69610e1afefb803afe45efeb7775babb 100644 (file)
@@ -425,7 +425,12 @@ class IOTest(unittest.TestCase):
                 writable = "w" in abilities
                 self.assertEqual(obj.writable(), writable)
                 seekable = "s" in abilities
-                self.assertEqual(obj.seekable(), seekable)
+
+                # Detection of pipes being non-seekable does not seem to work
+                # on Windows
+                if not sys.platform.startswith("win") or test not in (
+                        pipe_reader, pipe_writer):
+                    self.assertEqual(obj.seekable(), seekable)
 
                 if isinstance(obj, self.TextIOBase):
                     data = "3"