[Python-checkins] r70930 - in python/trunk/Lib/test: test_sqlite.py test_wait4.py

r.david.murray python-checkins at python.org
Wed Apr 1 01:45:39 CEST 2009


Author: r.david.murray
Date: Wed Apr  1 01:45:39 2009
New Revision: 70930

Log:
Fix Windows test skip error revealed by buildbot.  Also a comment spelling
correction in a previously fixed test.


Modified:
   python/trunk/Lib/test/test_sqlite.py
   python/trunk/Lib/test/test_wait4.py

Modified: python/trunk/Lib/test/test_sqlite.py
==============================================================================
--- python/trunk/Lib/test/test_sqlite.py	(original)
+++ python/trunk/Lib/test/test_sqlite.py	Wed Apr  1 01:45:39 2009
@@ -1,7 +1,7 @@
 import unittest
 from test.test_support import run_unittest, import_module
 
-#Skip test of _sqlite3 module not installed
+# Skip test if _sqlite3 module was not built.
 import_module('_sqlite3')
 
 from sqlite3.test import (dbapi, types, userfunctions, py25tests,

Modified: python/trunk/Lib/test/test_wait4.py
==============================================================================
--- python/trunk/Lib/test/test_wait4.py	(original)
+++ python/trunk/Lib/test/test_wait4.py	Wed Apr  1 01:45:39 2009
@@ -4,17 +4,12 @@
 import os
 import time
 from test.fork_wait import ForkWait
-from test.test_support import run_unittest, reap_children
+from test.test_support import run_unittest, reap_children, get_attribute
 
-try:
-    os.fork
-except AttributeError:
-    raise unittest.SkipTest, "os.fork not defined -- skipping test_wait4"
+# If either of these do not exist, skip this test.
+get_attribute(os, 'fork')
+get_attribute(os, 'wait4')
 
-try:
-    os.wait4
-except AttributeError:
-    raise unittest.SkipTest, "os.wait4 not defined -- skipping test_wait4"
 
 class Wait4Test(ForkWait):
     def wait_impl(self, cpid):


More information about the Python-checkins mailing list