summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_fork1.py11
-rw-r--r--Lib/test/test_popen2.py7
2 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py
index bd3e977..de9f7a9 100644
--- a/Lib/test/test_fork1.py
+++ b/Lib/test/test_fork1.py
@@ -6,21 +6,14 @@ child after a fork().
On some systems (e.g. Solaris without posix threads) we find that all
active threads survive in the child after a fork(); this is an error.
-On BeOS, you CANNOT mix threads and fork(), the behaviour is undefined.
-That's OK, fork() is a grotesque hack anyway. ;-) [cjh]
-
+While BeOS doesn't officially support fork and native threading in
+the same application, the present example should work just fine. DC
"""
import os, sys, time, thread
from test_support import verify, verbose, TestSkipped
try:
- if os.uname()[0] == "BeOS":
- raise TestSkipped, "can't mix os.fork with threads on BeOS"
-except AttributeError:
- pass
-
-try:
os.fork
except AttributeError:
raise TestSkipped, "os.fork not defined -- skipping test_fork1"
diff --git a/Lib/test/test_popen2.py b/Lib/test/test_popen2.py
index 1215847..799df4a 100644
--- a/Lib/test/test_popen2.py
+++ b/Lib/test/test_popen2.py
@@ -4,6 +4,8 @@
"""
import os
+import sys
+from test_support import TestSkipped
# popen2 contains its own testing routine
# which is especially useful to see if open files
@@ -12,6 +14,11 @@ import os
def main():
print "Test popen2 module:"
+ if sys.platform[:4] == 'beos' and __name__ != '__main__':
+ # Locks get messed up or something. Generally we're supposed
+ # to avoid mixing "posix" fork & exec with native threads, and
+ # they may be right about that after all.
+ raise TestSkipped, "popen2() doesn't work during import on BeOS"
try:
from os import popen
except ImportError: