summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-01-08 14:26:12 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-01-08 14:26:12 (GMT)
commit149e540adf47ccd57ac36afe265b7740a9dd74fc (patch)
tree398a86594984dcd1df3877b11e9b82938a6fdd75 /Lib/test/test_os.py
parente4314e05d5d96eed8a3f25db779f853fc5514969 (diff)
parent57ddf78b6b18d9da6f466b4e6da0437c3271196e (diff)
downloadcpython-149e540adf47ccd57ac36afe265b7740a9dd74fc.zip
cpython-149e540adf47ccd57ac36afe265b7740a9dd74fc.tar.gz
cpython-149e540adf47ccd57ac36afe265b7740a9dd74fc.tar.bz2
(Merge 3.3) Issue #20113: os.readv() and os.writev() now raise an OSError
exception on error instead of returning -1.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index fa6592d..5024093 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -1267,6 +1267,11 @@ class TestInvalidFD(unittest.TestCase):
def test_read(self):
self.check(os.read, 1)
+ @unittest.skipUnless(hasattr(os, 'readv'), 'test needs os.readv()')
+ def test_readv(self):
+ buf = bytearray(10)
+ self.check(os.readv, [buf])
+
@unittest.skipUnless(hasattr(os, 'tcsetpgrp'), 'test needs os.tcsetpgrp()')
def test_tcsetpgrpt(self):
self.check(os.tcsetpgrp, 0)
@@ -1275,6 +1280,10 @@ class TestInvalidFD(unittest.TestCase):
def test_write(self):
self.check(os.write, b" ")
+ @unittest.skipUnless(hasattr(os, 'writev'), 'test needs os.writev()')
+ def test_writev(self):
+ self.check(os.writev, [b'abc'])
+
class LinkTests(unittest.TestCase):
def setUp(self):