pytest-pudb icon indicating copy to clipboard operation
pytest-pudb copied to clipboard

Allow opening pudb not just on errors

Open cool-RR opened this issue 8 years ago • 2 comments

I want to run a single test, and have PuDB show up on the first line of the test. Is that possible?

cool-RR avatar Mar 31 '17 21:03 cool-RR

An easy way is to start a trace there. Add the following line at the beginning of your test:

import pudb;pudb.set_trace()

And pudb will stop there. However if you want randomly set break points using pudb and expect that py.test --pudb -k test_my_function stop when it finds such breakpoints its a different story. I think that it has to do with #3.

massich avatar Jul 17 '17 16:07 massich

Looks like pytest supports a --trace option that will drop into pdb at the start of each specified test. With the pudb plugin, is it possible to have it drop into pudb instead? Or maybe with a similar --trace-pudb option.

countvajhula avatar Aug 16 '19 00:08 countvajhula