[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 14:36:50 MDT 2001


On Tue, 25 Sep 2001, Glyph Lefkowitz <glyph at twistedmatrix.com> wrote:

> Python's -O does change the semantics of the language and get rid of a cool
> convenience syntax (albeit in a trivial manner) for an *extremely* marginal
> performance boost.

No, it gets rid of asserts, because that's what asserts are there for.
And it's not extremely marginal, either.

> Also, even if you test and test and test until you're SURE
> it's perfect, and then you run your 'production code' without any testing
> information available, that doesn't change the story when your 'production
> code' does fail, as it inevitably will.

You still have tracebacks.

> However in doing some reading before answering this message, I found out that
> PyUnit has some nifty useful methods like "assertEquals" and "assertRaises"
> that we should probably be using for tests anyway, so maybe the point is moot.

Yes.

> Those that are missing (like 'assertHasAttribute') we can probably write
> ourselves.  :-)

Yes again. And contribute upstream, too.

> ______      you are in a maze of twisted little applications, all
> |   |_\     remarkably consistent.

Way cool sig.
-- 
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