103 | | For debug use {{{python -c "import pdb; from unitpy.Runner import runTests; from path.to.YOURTESTCLASS import YOURTESTCLASS; pdb.set_trace(); runTests(YOURTESTCLASS)" -m pdb}}}. We recommend then to set a breakpoint using {{{b /ABSOLUTE/PATH/TO/YOURMODULE.py:LINENR}}} instead of debugging the entire runTest code. And then use 'c' to continue to the breakpoint. |
| 101 | For debug use |
| 102 | {{{ |
| 103 | python -c "import pdb; from unitpy.Runner import runTests; from path.to.YOURTESTCLASS import YOURTESTCLASS; pdb.set_trace(); runTests(YOURTESTCLASS)" -m pdb |
| 104 | }}}. |
| 105 | We recommend then to set a breakpoint using {{{b /ABSOLUTE/PATH/TO/YOURMODULE.py:LINENR}}} instead of debugging the entire runTest code. And then use 'c' to continue to the breakpoint. |
| 106 | |
| 107 | |
| 108 | Theoretically, for debugging you would need to **install** pytest ({{{sudo apt install python3-pytest}}}) after which you can do {{{pytest-3 --trace path/to/YOURTESTCLASS.py}}}. Unfortunately there seems a bug in pytest-3 and it does not debug at the first test. This makes this approach mostly useless. |
| 109 | |