summaryrefslogtreecommitdiff
path: root/Lib/test/test_posix.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2019-06-11 10:15:31 -0700
committerGitHub <noreply@github.com>2019-06-11 10:15:31 -0700
commit44867bb9376e324493f0149ac8b3c33f23c9050d (patch)
tree86c1386468f7df393a9c5152e63b20e5c096f870 /Lib/test/test_posix.py
parent910b3fcb01c29f18ffd53086e36cd2cb9e5fae55 (diff)
downloadcpython-git-44867bb9376e324493f0149ac8b3c33f23c9050d.tar.gz
Fix test_posix if RWF_HIPRI is defined but not preadv2. (GH-13980)
If preadv2 is not available, preadv will raise NotImplementedError.
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r--Lib/test/test_posix.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 5c93d0d507..0f07a8f2e6 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -310,6 +310,8 @@ class PosixTester(unittest.TestCase):
buf = [bytearray(i) for i in [5, 3, 2]]
self.assertEqual(posix.preadv(fd, buf, 3, os.RWF_HIPRI), 10)
self.assertEqual([b't1tt2', b't3t', b'5t'], list(buf))
+ except NotImplementedError:
+ self.skipTest("preadv2 not available")
except OSError as inst:
# Is possible that the macro RWF_HIPRI was defined at compilation time
# but the option is not supported by the kernel or the runtime libc shared