How to use py.test from Python?

前端 未结 7 875
旧巷少年郎
旧巷少年郎 2020-12-30 04:38

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

7条回答
  •  既然无缘
    2020-12-30 05:08

    I have not tried with eclipse, but as was suggested in a related question, it is possible to use the --pdb command line option with py.test. Maybe it is possible to configure eclipse that way.

    However, calling the standard import pdb;pdb.set_trace() will not directly call the debugger. First it will issue an error which in turn will activate the debugger. This might or might not make things work differently.

提交回复
热议问题