[Python-checkins] cpython: Skip test_pipe2 on Linux kernels older than 2.6.27.

charles-francois.natali python-checkins at python.org
Sun May 29 20:46:31 CEST 2011


http://hg.python.org/cpython/rev/76e9c3e876d4
changeset: 70502:76e9c3e876d4
user: Charles-François Natali <neologix at free.fr>
date: Sun May 29 20:46:27 2011 +0200
summary:
 Skip test_pipe2 on Linux kernels older than 2.6.27.
files:
 Lib/test/test_posix.py | 4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -480,6 +480,10 @@
 
 @unittest.skipUnless(hasattr(os, 'pipe2'), "test needs os.pipe2()")
 def test_pipe2(self):
+ version = support.linux_version()
+ if sys.platform == 'linux2' and version < (2, 6, 27):
+ self.skipTest("Linux kernel 2.6.27 or higher required, "
+ "not %s.%s.%s" % version)
 self.assertRaises(TypeError, os.pipe2, 'DEADBEEF')
 self.assertRaises(TypeError, os.pipe2, 0, 0)
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /