I\'m working in a project that recently switched to the py.test unittest framework. I was used to call my tests from Eclipse, so that I can use the debugger (e.g. placing br
I think I can now answer my own question, it's pretty simple:
import py
py.test.cmdline.main(args)
Then I can run this module and or start it with the integrated debugger.
args
is the list of command line arguments, so for example to run only particular tests I can use something like:
args_str = "-k test_myfavorite"
py.test.cmdline.main(args_str.split(" "))