Commits

Brett Cannon committed 520adfa

Clean up the messages used by some tests.

Comments (0)

Files changed (4)

Lib/test/test_devpoll.py

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

Lib/test/test_openpty.py

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

Lib/test/test_poll.py

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

Lib/test/test_wait3.py

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