En Fri, 14 Mar 2008 17:23:14 -0200, Amit Gupta <[EMAIL PROTECTED]> escribi�: > On Feb 20, 8:51 pm, Miki <[EMAIL PROTECTED]> 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 >> > > So What do I do, if my testcase if failing because of an uncaught > exception and I want to run it in pdb.
Run your script with python -i testname.py If an exception occur, you'll get the Python prompt. Execute: py> import pdb py> pdb.pm() to enter pdb "post-mortem". -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list