[Tutor] unittest skipping tests

Walter Prins wprins at gmail.com
Thu Aug 1 15:42:24 CEST 2013


Hi,

On 1 August 2013 14:22, Matthew Ngaha <chigga101 at gmail.com> wrote:

> Thanks guys. i was following some examples and noticed it. I tried to
> use it in my program and the same thing happened. In this example,
> there are 6 tests, and only 4 run.
>
> http://bpaste.net/show/abLNTHU49w1j2M8Fey8X/
>

The reason that 2 of the tests are apparently ignored, is because they are
overwritten/redefined by the last 2 test methods in the class, which have
the same name as the prior 2.  You cannot have have multiple methods with
the same name in the same class.    Change the name of the last 2 methods
in your class and your problem will go away.

Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130801/ad3aca64/attachment.html>


More information about the Tutor mailing list