[Twisted-Python] Re: [Twisted-commits] CVS: Twisted/twisted/test test_protocols.py,1.6,1.7

Moshe Zadka m at moshez.org
Tue Sep 25 12:09:37 MDT 2001


On Tue, 25 Sep 2001, Itamar Shtull-Trauring <itamarst at twistedmatrix.com> wrote:

> +            assert r.brokenPeer, "connection wasn't closed on illegal netstring %s" % repr(s)

Itamar, and everybody: STOP DOING THAT!!!!!!!!!!!!!!!!!!!!!!!!
Don't use "assert" in tests, since they don't operate under python -O.
Someday, we'll want to test it working ok with -O. (say, if there is some
less-then-trivial code undef "if __debug__".)
-- 
The Official Moshe Zadka FAQ: http://moshez.geek
The Official Moshe Zadka FAQ For Dummies: http://moshez.org
Read the FAQ





More information about the Twisted-Python mailing list