diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-03-31 10:31:30 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-03-31 10:31:30 (GMT) |
commit | 0950e6aef6a0de3e38cb549c51e75671f9249f05 (patch) | |
tree | 0d45ad4a8cde838b7c6a255439b0aef2830b43a9 | |
parent | 754aab28ed5f94338641db8899f89f59895c2137 (diff) | |
download | cpython-0950e6aef6a0de3e38cb549c51e75671f9249f05.zip cpython-0950e6aef6a0de3e38cb549c51e75671f9249f05.tar.gz cpython-0950e6aef6a0de3e38cb549c51e75671f9249f05.tar.bz2 |
Issue #22854: Skip pipe seek tests on Windows
-rw-r--r-- | Lib/test/test_io.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 51c250b..f3b33f2 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -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) |