Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4951782

Browse files
committed
Raise ImportError when os.fork does not exist.
1 parent 42c29aa commit 4951782

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_fork1.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
import os, sys, time, thread
1212

13+
try:
14+
os.fork
15+
except AttributeError:
16+
raise ImportError, "os.fork not defined -- skipping test_fork1"
17+
1318
LONGSLEEP = 2
1419

1520
SHORTSLEEP = 0.5

0 commit comments

Comments
 (0)