Issue #22854: Skip pipe seekable() tests on Windows

This commit is contained in:
Martin Panter 2016-03-31 10:31:30 +00:00
parent 047f3b7376
commit c0aab1da3b
1 changed files with 6 additions and 1 deletions

View File

@ -425,7 +425,12 @@ class IOTest(unittest.TestCase):
writable = "w" in abilities writable = "w" in abilities
self.assertEqual(obj.writable(), writable) self.assertEqual(obj.writable(), writable)
seekable = "s" in abilities 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): if isinstance(obj, self.TextIOBase):
data = "3" data = "3"