summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-05-04 00:36:42 (GMT)
committerGuido van Rossum <guido@python.org>2000-05-04 00:36:42 (GMT)
commit495178217854e2bea9d8528d3d2a04bcf9a6078b (patch)
treedb50cb108779c5cbe7e2e818ad15be64f9684699 /Lib/test
parent42c29aaeb56896edc856f021fa09fa83a5553356 (diff)
downloadcpython-495178217854e2bea9d8528d3d2a04bcf9a6078b.zip
cpython-495178217854e2bea9d8528d3d2a04bcf9a6078b.tar.gz
cpython-495178217854e2bea9d8528d3d2a04bcf9a6078b.tar.bz2
Raise ImportError when os.fork does not exist.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_fork1.py5
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