diff options
author | Marc-André Lemburg <mal@egenix.com> | 2001-01-17 19:11:13 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2001-01-17 19:11:13 (GMT) |
commit | 3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e (patch) | |
tree | eea0f44df59aaaf014eb4580f1fad308e31601bf /Lib/test/test_gc.py | |
parent | 8551dd60781f738e5e5ef4e22b6f071d27e20b50 (diff) | |
download | cpython-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_gc.py')
-rw-r--r-- | Lib/test/test_gc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py index f4714d5..1c008be 100644 --- a/Lib/test/test_gc.py +++ b/Lib/test/test_gc.py @@ -1,4 +1,4 @@ -from test_support import verbose, TestFailed +from test_support import verify, verbose, TestFailed import gc def run_test(name, thunk): @@ -161,7 +161,7 @@ def test(): print "disabling automatic collection" enabled = gc.isenabled() gc.disable() - assert not gc.isenabled() + verify(not gc.isenabled() ) debug = gc.get_debug() gc.set_debug(debug & ~gc.DEBUG_LEAK) # this test is supposed to leak @@ -174,7 +174,7 @@ def test(): print "restoring automatic collection" # make sure to always test gc.enable() gc.enable() - assert gc.isenabled() + verify(gc.isenabled()) if not enabled: gc.disable() |