[Python-checkins] Fix test_posix if RWF_HIPRI is defined but not preadv2. (GH-13980)
Miss Islington (bot)
webhook-mailer at python.org
Tue Jun 11 13:59:23 EDT 2019
https://github.com/python/cpython/commit/b9ecc0fadaf04aa5f7c9cec9addb4c9c97380fee
commit: b9ecc0fadaf04aa5f7c9cec9addb4c9c97380fee
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-11T10:58:57-07:00
summary:
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 at python.org>
files:
M Lib/test/test_posix.py
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 5c93d0d507d2..0f07a8f2e68d 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -310,6 +310,8 @@ def test_preadv_flags(self):
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
More information about the Python-checkins
mailing list