summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-06-11 10:33:36 -0700
committerGitHub <noreply@github.com>2019-06-11 10:33:36 -0700
commit22e8a6d013c14f8724f396011fe22f13ea1641aa (patch)
treea68c58a0ab01411a9925d9fd0a20b287dfc954ff /Lib
parentfad89046e14b271b2eeb399f7c7b45131d65e5f2 (diff)
downloadcpython-git-22e8a6d013c14f8724f396011fe22f13ea1641aa.tar.gz
Fix test_posix if RWF_HIPRI is defined but not preadv2. (GH-13980)
If preadv2 is not available, preadv will raise NotImplementedError. (cherry picked from commit 44867bb9376e324493f0149ac8b3c33f23c9050d) Co-authored-by: Benjamin Peterson <benjamin@python.org>
Diffstat (limited to 'Lib')
-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 5507735458..233fea4d57 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -308,6 +308,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