From ad74dfe8ff6253d258aa6e35af0c755bcee2f4ac Mon Sep 17 00:00:00 2001 From: "R. David Murray" Date: Mon, 30 Mar 2009 15:14:01 +0000 Subject: Convert import try/except to use test_support.import_module(). --- Lib/test/test_fork1.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py index dfd5016..cfb3a71 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): -- cgit v0.12