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.
diff --git a/Lib/test/test_b2.py b/Lib/test/test_b2.py
index 9871652..3af5e66 100644
--- a/Lib/test/test_b2.py
+++ b/Lib/test/test_b2.py
@@ -267,7 +267,7 @@
raise TestFailed, 'xrange(0,10,2)'
# regression tests for SourceForge bug #121695
def _range_test(r):
- assert r.start != r.stop, 'Test not valid for passed-in xrange object.'
+ verify(r.start != r.stop, 'Test not valid for passed-in xrange object.')
if r.stop in r:
raise TestFailed, 'r.stop in ' + `r`
if r.stop-r.step not in r: