summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fork1.py
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2001-01-17 19:11:13 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2001-01-17 19:11:13 (GMT)
commit3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e (patch)
treeeea0f44df59aaaf014eb4580f1fad308e31601bf /Lib/test/test_fork1.py
parent8551dd60781f738e5e5ef4e22b6f071d27e20b50 (diff)
downloadcpython-3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e.zip
cpython-3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e.tar.gz
cpython-3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e.tar.bz2
This patch removes all uses of "assert" in the regression test suite
and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
Diffstat (limited to 'Lib/test/test_fork1.py')
-rw-r--r--Lib/test/test_fork1.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py
index 4fd2662..bd3e977 100644
--- a/Lib/test/test_fork1.py
+++ b/Lib/test/test_fork1.py
@@ -12,7 +12,7 @@ That's OK, fork() is a grotesque hack anyway. ;-) [cjh]
"""
import os, sys, time, thread
-from test_support import TestSkipped
+from test_support import verify, verbose, TestSkipped
try:
if os.uname()[0] == "BeOS":
@@ -51,7 +51,7 @@ def main():
a = alive.keys()
a.sort()
- assert a == range(NUM_THREADS)
+ verify(a == range(NUM_THREADS))
prefork_lives = alive.copy()
@@ -68,8 +68,9 @@ def main():
else:
# Parent
spid, status = os.waitpid(cpid, 0)
- assert spid == cpid
- assert status == 0, "cause = %d, exit = %d" % (status&0xff, status>>8)
+ verify(spid == cpid)
+ verify(status == 0,
+ "cause = %d, exit = %d" % (status&0xff, status>>8) )
global stop
# Tell threads to die
stop = 1