From 495178217854e2bea9d8528d3d2a04bcf9a6078b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 4 May 2000 00:36:42 +0000 Subject: [PATCH] Raise ImportError when os.fork does not exist. --- Lib/test/test_fork1.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py index 0d20fb3a6df..67e30dfdbd7 100644 --- a/Lib/test/test_fork1.py +++ b/Lib/test/test_fork1.py @@ -10,6 +10,11 @@ active threads survive in the child after a fork(); this is an error. import os, sys, time, thread +try: + os.fork +except AttributeError: + raise ImportError, "os.fork not defined -- skipping test_fork1" + LONGSLEEP = 2 SHORTSLEEP = 0.5