summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fork1.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_fork1.py')
-rw-r--r--Lib/test/test_fork1.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py
index c9f18d9..e036661 100644
--- a/Lib/test/test_fork1.py
+++ b/Lib/test/test_fork1.py
@@ -3,14 +3,12 @@
import os
import time
-import unittest
from test.fork_wait import ForkWait
-from test.support import run_unittest, reap_children
+from test.support import run_unittest, reap_children, get_attribute
+
+# Skip test if fork does not exist.
+get_attribute(os, 'fork')
-try:
- os.fork
-except AttributeError:
- raise unittest.SkipTest("os.fork not defined -- skipping test_fork1")
class ForkTest(ForkWait):
def wait_impl(self, cpid):