Raise ImportError when os.fork does not exist.

This commit is contained in:
Guido van Rossum 2000-05-04 00:36:42 +00:00
parent 42c29aaeb5
commit 4951782178
1 changed files with 5 additions and 0 deletions

View File

@ -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