File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -290,7 +290,14 @@ def test_writev(self):
290290 self .assertEqual (b'test1tt2t3' , posix .read (fd , 10 ))
291291
292292 # Issue #20113: empty list of buffers should not crash
293- self .assertEqual (posix .writev (fd , []), 0 )
293+ try :
294+ size = posix .writev (fd , [])
295+ except OSError :
296+ # writev(fd, []) raises OSError(22, "Invalid argument")
297+ # on OpenIndiana
298+ pass
299+ else :
300+ self .assertEqual (size , 0 )
294301 finally :
295302 os .close (fd )
296303
@@ -305,7 +312,14 @@ def test_readv(self):
305312 self .assertEqual ([b'test1' , b'tt2' , b't3' ], [bytes (i ) for i in buf ])
306313
307314 # Issue #20113: empty list of buffers should not crash
308- self .assertEqual (posix .readv (fd , []), 0 )
315+ try :
316+ size = posix .readv (fd , [])
317+ except OSError :
318+ # readv(fd, []) raises OSError(22, "Invalid argument")
319+ # on OpenIndiana
320+ pass
321+ else :
322+ self .assertEqual (size , 0 )
309323 finally :
310324 os .close (fd )
311325
You can’t perform that action at this time.
0 commit comments