summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fork1.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-03-30 19:04:00 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-03-30 19:04:00 (GMT)
commit59beec326a4721154a952027cb34c3e2e4612e28 (patch)
treefd6ff5a872e8b8624a6aad51423f4a0a5ec6eaad /Lib/test/test_fork1.py
parentbb8cb0e192c1da800fee1d08b13534ca3db4d53a (diff)
downloadcpython-59beec326a4721154a952027cb34c3e2e4612e28.zip
cpython-59beec326a4721154a952027cb34c3e2e4612e28.tar.gz
cpython-59beec326a4721154a952027cb34c3e2e4612e28.tar.bz2
Add import_function method to test.test_support, and modify a number of
tests that expect to be skipped if imports fail or functions don't exist to use import_function and import_module. The ultimate goal is to change regrtest to not skip automatically on ImportError. Checking in now to make sure the buldbots don't show any errors on platforms I can't direct test on.
Diffstat (limited to 'Lib/test/test_fork1.py')
-rw-r--r--Lib/test/test_fork1.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py
index dfd5016..9306242 100644
--- a/Lib/test/test_fork1.py
+++ b/Lib/test/test_fork1.py
@@ -3,14 +3,12 @@
import os
import time
-import unittest
from test.fork_wait import ForkWait
-from test.test_support import run_unittest, reap_children
+from test.test_support import run_unittest, reap_children, import_function
+
+#Skip test if fork does not exist.
+import_function(os, 'fork')
-try:
- os.fork
-except AttributeError:
- raise unittest.SkipTest, "os.fork not defined -- skipping test_fork1"
class ForkTest(ForkWait):
def wait_impl(self, cpid):