From: R. David Murray Date: Mon, 30 Mar 2009 15:14:01 +0000 (+0000) Subject: Convert import try/except to use test_support.import_module(). X-Git-Tag: v2.7a1~1750 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad74dfe8ff6253d258aa6e35af0c755bcee2f4ac;p=thirdparty%2FPython%2Fcpython.git Convert import try/except to use test_support.import_module(). --- diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py index dfd501665ce3..cfb3a7141786 100644 --- a/Lib/test/test_fork1.py +++ b/Lib/test/test_fork1.py @@ -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):