简体   繁体   中英

python doctest: stop example execution and use the resulting context in some shell

我认为我可以在测试中输入一些指令,该指令可以让我在指令的位置以交互方式运行一些命令,然后继续执行示例,但我不记得它是什么...

您是说要在测试中放置一个断点以进入调试器?

import pdb; pdb.set_trace()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM