Convert import try/except to use test_support.import_module().

This commit is contained in:
R. David Murray 2009-03-30 15:14:01 +00:00
parent 3c87e2289d
commit ad74dfe8ff
1 changed files with 3 additions and 6 deletions

View File

@ -3,14 +3,11 @@
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_module
import_module('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):