]> granicus.if.org Git - python/commitdiff
Clean up the messages used by some tests.
authorBrett Cannon <brett@python.org>
Wed, 14 Nov 2012 20:16:53 +0000 (15:16 -0500)
committerBrett Cannon <brett@python.org>
Wed, 14 Nov 2012 20:16:53 +0000 (15:16 -0500)
Lib/test/test_devpoll.py
Lib/test/test_openpty.py
Lib/test/test_poll.py
Lib/test/test_wait3.py

index bef4e1846b2ac46558f0c4a5dc22a2b70ec5f042..ec350cd4953a6b1907e982891b983996f3bc6726 100644 (file)
@@ -8,7 +8,7 @@ from test.support import TESTFN, run_unittest
 try:
     select.devpoll
 except AttributeError:
-    raise unittest.SkipTest("select.devpoll not defined -- skipping test_devpoll")
+    raise unittest.SkipTest("select.devpoll not defined")
 
 
 def find_ready_matching(ready, flag):
index e8175ff094d076e486feaef8f9cdf32a9f85d4ae..8713d346719747f81cdce7ba1e180155656d86ca 100644 (file)
@@ -4,7 +4,7 @@ import os, unittest
 from test.support import run_unittest
 
 if not hasattr(os, "openpty"):
-    raise unittest.SkipTest("No openpty() available.")
+    raise unittest.SkipTest("os.openpty() not available.")
 
 
 class OpenptyTest(unittest.TestCase):
index 7ab3b84a97d378b0eaabd95639cd44684bd6ccc1..720cff3bd5b1576f9ff1efbff89497887f4cc559 100644 (file)
@@ -6,7 +6,7 @@ from test.support import TESTFN, run_unittest
 try:
     select.poll
 except AttributeError:
-    raise unittest.SkipTest("select.poll not defined -- skipping test_poll")
+    raise unittest.SkipTest("select.poll not defined")
 
 
 def find_ready_matching(ready, flag):
index bd06c8d8bd3471ded4e78b45350f2c307f8d5373..3d70ced655d74e0fc80b76d883dab45287ee6944 100644 (file)
@@ -7,15 +7,11 @@ import unittest
 from test.fork_wait import ForkWait
 from test.support import run_unittest, reap_children
 
-try:
-    os.fork
-except AttributeError:
-    raise unittest.SkipTest("os.fork not defined -- skipping test_wait3")
+if not hassattr(os, 'fork'):
+    raise unittest.SkipTest("os.fork not defined")
 
-try:
-    os.wait3
-except AttributeError:
-    raise unittest.SkipTest("os.wait3 not defined -- skipping test_wait3")
+if not hasattr(os, 'wait3'):
+    raise unittest.SkipTest("os.wait3 not defined")
 
 class Wait3Test(ForkWait):
     def wait_impl(self, cpid):