Skip test_pipe2 on Linux kernels older than 2.6.27.

This commit is contained in:
Charles-François Natali 2011-05-29 20:46:27 +02:00
parent daafdd5bea
commit d92ccb1f75
1 changed files with 4 additions and 0 deletions

View 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)