]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Skip test_pipe2 on Linux kernels older than 2.6.27.
authorCharles-François Natali <neologix@free.fr>
Sun, 29 May 2011 18:46:27 +0000 (20:46 +0200)
committerCharles-François Natali <neologix@free.fr>
Sun, 29 May 2011 18:46:27 +0000 (20:46 +0200)
Lib/test/test_posix.py

index e9103cd88032e0f93968e3fbe14a7e0bd9bb27b9..79e2d367b968ecf14fcc34d688ea6862373439f3 100644 (file)
@@ -480,6 +480,10 @@ class PosixTester(unittest.TestCase):
 
     @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)