Trepan调试器的Pytest插件。
pytest-trepan的Python项目详细描述
摘要
的pytest插件使用
安装后,设置断点以进入trepan调试器:
import pytest def test_function(): ... pytest.trepan() # get thee into the debugger! x = 1 ...
上面的代码看起来像是在pytest.trepan() 打电话来。当这是 范围。如果您想在x = 1passimmediate=False之前停止,或者只是False:
import pytest def test_function(): ... pytest.trepan(immediate=False) # same as py.trepan(False) x = 1 ...
还可以将trepan.api.debug()接受的任何参数作为关键字参数传递。
若要在出错时输入调试器,请使用--trepan选项:
$ py.test --trepan ...
项目详细信息
- github上的项目代码+问题跟踪-https://github.com/rocky/pytest-trepan
- pypi-https://pypi.python.org/pypi/pytest-trepan