Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我跑
nosetests --doctest-extension=.txt
我明白了
在 0.002 秒内运行 0 次测试 好的
在 0.002 秒内运行 0 次测试
好的
当我在文件 README.txt 中有测试时,为什么它说 0 个测试?
如果您正在使用doctest,您还必须指定nose必须在启用 doctest 插件的情况下运行。
doctest
nose
这应该可以解决问题:
nosetests --with-doctest --doctest-extension=txt