cpython (merge 3.5 -> default): Issue #22854: Merge Windows pipe skipping from 3.5
![](https://secure.gravatar.com/avatar/8ac615df352a970211b0e3d94a307c6d.jpg?s=120&d=mm&r=g)
https://hg.python.org/cpython/rev/3b7811b58a1f changeset: 100812:3b7811b58a1f parent: 100810:fb10d1f5016e parent: 100811:66765a49465f user: Martin Panter <vadmium+py@gmail.com> date: Thu Mar 31 11:17:08 2016 +0000 summary: Issue #22854: Merge Windows pipe skipping from 3.5 files: 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 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -424,13 +424,6 @@ 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 @@ 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) -- Repository URL: https://hg.python.org/cpython
participants (1)
-
martin.panter