From 3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e Mon Sep 17 00:00:00 2001 From: Marc-André Lemburg Date: Wed, 17 Jan 2001 19:11:13 +0000 Subject: 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. --- Lib/test/test_extcall.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Lib/test/test_extcall.py') diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index b53ced75038..5b6c5ec3694 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -1,3 +1,4 @@ +from test_support import verify, verbose from UserList import UserList from test_support import TestFailed import string @@ -79,11 +80,11 @@ g(*Nothing()) # make sure the function call doesn't stomp on the dictionary? d = {'a': 1, 'b': 2, 'c': 3} d2 = d.copy() -assert d == d2 +verify(d == d2) g(1, d=4, **d) print d print d2 -assert d == d2, "function call modified dictionary" +verify(d == d2, "function call modified dictionary") # what about willful misconduct? def saboteur(**kw): @@ -91,7 +92,7 @@ def saboteur(**kw): return kw d = {} kw = saboteur(a=1, **d) -assert d == {} +verify(d == {}) # break the cycle del kw['x'] -- cgit v1.2.3