]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #16616: Enable test in test_poll which was (accidentally?) disabled
authorRichard Oudkerk <shibturn@gmail.com>
Sun, 9 Dec 2012 16:05:20 +0000 (16:05 +0000)
committerRichard Oudkerk <shibturn@gmail.com>
Sun, 9 Dec 2012 16:05:20 +0000 (16:05 +0000)
Lib/test/test_poll.py

index 720cff3bd5b1576f9ff1efbff89497887f4cc559..d0e4f32f511e214b46cfd2dceca0bab4bceee551 100644 (file)
@@ -67,13 +67,11 @@ class PollTests(unittest.TestCase):
 
         self.assertEqual(bufs, [MSG] * NUM_PIPES)
 
-    def poll_unit_tests(self):
+    def test_poll_unit_tests(self):
         # returns NVAL for invalid file descriptor
-        FD = 42
-        try:
-            os.close(FD)
-        except OSError:
-            pass
+        FD, w = os.pipe()
+        os.close(FD)
+        os.close(w)
         p = select.poll()
         p.register(FD)
         r = p.poll()