[Patches] [Patch #101843] Remove all uses of "assert" from the test suite

noreply@sourceforge.net noreply@sourceforge.net
Tue, 24 Oct 2000 13:57:41 -0700


Patch #101843 has been updated. 

Project: 
Category: core (C code)
Status: Open
Summary: Remove all uses of "assert" from the test suite

Follow-Ups:

Date: 2000-Oct-09 07:25
By: lemburg

Comment:
This patch removes all uses of the assert statement from the
regression test suite. Use of assert in the suite is depreciated
due to asserts being removed from the byte code when Python
is run in optimized mode.

The patch adds a new function to test_support (verify) which
handles the asserts in a more customizable way. It does not
rely on the assert statement.

I have tested this patch lightly (meaning that the suite runs through
just fine). Not all execution paths are testable due to the nature
of the patch, though.

Please review.
-------------------------------------------------------

Date: 2000-Oct-09 12:26
By: gvanrossum

Comment:
Great! But let's do this post-2.0 final release. I'm really getting worried about patches that touch every file in a particular corner of the universe... :-(
-------------------------------------------------------

Date: 2000-Oct-24 13:57
By: gvanrossum

Comment:
Would you mind resubmitting this? Some of the patches fail, probably because there were a lot of changes to the whitespace. The idea is still as valid as it was before.

A style nit: please don't include spaces inside parentheses: please write
verify(cond, reason) rather than verify( cond, reason ).
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101843&group_id=5470