Pytest

Pytest 标签下共有 1 篇文章

Pytest Tips

• bwangel Python pytest

pytest 启动 pdb 调试

  1. 安装 ipython

  2. 在想要打断点的地方, 写入语句 import pdb; pdb.set_trace()

  3. 执行 pytest 测试函数

pytest dir/test_files --pdb --pdbcls=IPython.terminal.debugger:TerminalPdb

Pytest …