diff options
author | Guido van Rossum <guido@python.org> | 2000-05-04 00:36:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-04 00:36:42 (GMT) |
commit | 495178217854e2bea9d8528d3d2a04bcf9a6078b (patch) | |
tree | db50cb108779c5cbe7e2e818ad15be64f9684699 /Lib | |
parent | 42c29aaeb56896edc856f021fa09fa83a5553356 (diff) | |
download | cpython-495178217854e2bea9d8528d3d2a04bcf9a6078b.zip cpython-495178217854e2bea9d8528d3d2a04bcf9a6078b.tar.gz cpython-495178217854e2bea9d8528d3d2a04bcf9a6078b.tar.bz2 |
Raise ImportError when os.fork does not exist.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_fork1.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py index 0d20fb3..67e30df 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 |