diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-03-31 11:17:08 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-03-31 11:17:08 (GMT) |
commit | f810767bd37b57b3051b4b47a32d96311736b4d3 (patch) | |
tree | b7f3d41c36ac4e63b9955610f39cb3c138f235b6 /Lib/test/test_io.py | |
parent | c0aab1da3bb0c5f8b6b7fc20278f05ebcf2f0994 (diff) | |
parent | 0950e6aef6a0de3e38cb549c51e75671f9249f05 (diff) | |
download | cpython-f810767bd37b57b3051b4b47a32d96311736b4d3.zip cpython-f810767bd37b57b3051b4b47a32d96311736b4d3.tar.gz cpython-f810767bd37b57b3051b4b47a32d96311736b4d3.tar.bz2 |
Issue #22854: Merge Windows pipe skipping from 3.5
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 9c410e7..ab7fedf 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -424,13 +424,6 @@ class IOTest(unittest.TestCase): self.assertEqual(obj.readable(), readable) writable = "w" in abilities self.assertEqual(obj.writable(), writable) - seekable = "s" in abilities - - # 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" @@ -456,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) |