Re: [Pyunit-interest] How to test a condition
Brought to you by:
purcell
From: Chuck E. <Chu...@ya...> - 2001-09-03 05:56:47
|
At 03:17 PM 9/2/2001 +0200, Steve Purcell wrote: >Yes they are. I'm guilty of writing the separate pyunit docs, and Fred Drake >wrote the standard library docs for the unittest module. > >There was some discussion about the appropriateness of using 'assert' and >AssertionError when the Py2.1 integration was made. PyUnit was modified so >that a different error could be used to indicate failure at a later date >if Python's 'assert' and optimisation behaviour is altered. > >So the best idea is probably to favour the TestCase methods such as >'failUnless()' over the 'assert' statement. > >However, I still use the 'assert' statement when I feel like it, and when >I don't plan to run tests with Python's -O optimisation enabled. > >How's that for muddying the waters? :-) Pretty good. ;-) But at least I have an idea of where things stand. The differences made me curious. Thanks, -Chuck |