File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -424,13 +424,6 @@ class UnseekableWriter(self.MockUnseekableIO):
424424 self .assertEqual (obj .readable (), readable )
425425 writable = "w" in abilities
426426 self .assertEqual (obj .writable (), writable )
427- seekable = "s" in abilities
428-
429- # Detection of pipes being non-seekable does not seem to work
430- # on Windows
431- if not sys .platform .startswith ("win" ) or test not in (
432- pipe_reader , pipe_writer ):
433- self .assertEqual (obj .seekable (), seekable )
434427
435428 if isinstance (obj , self .TextIOBase ):
436429 data = "3"
@@ -456,6 +449,13 @@ class UnseekableWriter(self.MockUnseekableIO):
456449 else :
457450 self .assertRaises (OSError , obj .write , data )
458451
452+ if sys .platform .startswith ("win" ) or test in (
453+ pipe_reader , pipe_writer ):
454+ # Pipes seem to appear as seekable on Windows
455+ continue
456+ seekable = "s" in abilities
457+ self .assertEqual (obj .seekable (), seekable )
458+
459459 if seekable :
460460 obj .tell ()
461461 obj .seek (0 )
You can’t perform that action at this time.
0 commit comments