]> granicus.if.org Git - python/commitdiff
Fix Windows test skip error revealed by buildbot. Also a comment spelling
authorR. David Murray <rdmurray@bitdance.com>
Tue, 31 Mar 2009 23:45:39 +0000 (23:45 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Tue, 31 Mar 2009 23:45:39 +0000 (23:45 +0000)
correction in a previously fixed test.

Lib/test/test_sqlite.py
Lib/test/test_wait4.py

index f8b2f9816b91635d931db090037978d513b349f5..167408cd3dbf68daa1771e8a85868bb1504d431e 100644 (file)
@@ -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,
index 60b89e8439aa293fe293bd6423ee8e227a14a9a3..d04a11bde108ecdaf42ffeb6b833dde93399b5b9 100644 (file)
@@ -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):