]> granicus.if.org Git - python/commitdiff
Raise ImportError when os.fork does not exist.
authorGuido van Rossum <guido@python.org>
Thu, 4 May 2000 00:36:42 +0000 (00:36 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 4 May 2000 00:36:42 +0000 (00:36 +0000)
Lib/test/test_fork1.py

index 0d20fb3a6df8998b5cbedf76ef65d5418b201c7f..67e30dfdbd713a1fc37a1cae31f8c81498ff0b51 100644 (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