Python进程不会退出
我正在使用鼻子测试来运行一些测试。然而,测试运行完成后,nosetests进程只是坐在那里,不会退出。有什么办法可以诊断这个吗? Python 是否有类似于向 Java 发送kill -QUIT 的功能来打印堆栈跟踪?
I'm use nosetests to run some tests. However, after the tests have finished running, the nosetests process just sits there, and will not exit. Is there anyway to diagnose this? Does Python have a facility similar to sending Java a kill -QUIT which will print a stack trace?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
其中-x是“在第一个错误或失败后停止运行测试”,--pdb是“在失败或错误时放入调试器”
另请参阅http://nose.readthedocs.org/en/latest/usage.html
where -x is "Stop running tests after the first error or failure" and --pdb is "Drop into debugger on failures or errors"
Also see http://nose.readthedocs.org/en/latest/usage.html
您可以进入调试器并输入
bt
:然后您可以单步执行操作并查看它挂在哪里。
You can enter the debugger and type
bt
:Then you can step through the operation and see where it hangs.