Convert import try/except to use test_support.import_module().
This commit is contained in:
parent
3c87e2289d
commit
ad74dfe8ff
|
@ -3,14 +3,11 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import unittest
|
|
||||||
from test.fork_wait import ForkWait
|
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):
|
class ForkTest(ForkWait):
|
||||||
def wait_impl(self, cpid):
|
def wait_impl(self, cpid):
|
||||||
|
|
Loading…
Reference in New Issue