unitests don't run under pdb

Amit Gupta emailamit at gmail.com
Fri Mar 14 20:23:14 CET 2008


On Feb 20, 8:51 pm, Miki <miki.teb... at gmail.com> wrote:
> Hello Amit,
>
>
>
> > python testname.py : the unitests runs as usual and I get the
> > following results:
> > ----------------------------------------------------------------------
> > Ran 2 tests in 0.024s
>
> > OK
> > --------------------------------------------------------------------
>
> > However, if I do "python -mpdbtestnames.py": I get
> > ython -mpdbtestnames.py> /s/nd6/amit/pyiglu/testnames.py(1)<module>()
>
> > -> importunittest
> > (Pdb) c
>
> > ----------------------------------------------------------------------
> > Ran 0 tests in 0.000s
>
> > OK
> > -------------------------------------------------------------------
>
> IIRCunittestchecks the __main__ module for tests to run. Once you
> run python with "-mpdb" the __main__ module ispdband not your
> script.
>
> HTH,
> --
> Miki <miki.teb... at gmail.com>http://pythonwise.blogspot.com

Ok, Sorry for late reply on this.

So What do I do, if my testcase if failing because of an uncaught
exception and I want to run it in pdb.

Thanks



More information about the Python-list mailing list