testing.
rundocs
运行在给定文件中找到的doctests。
默认情况下 rundocs 失败时引发断言错误。
为其运行doctests的文件的路径。
当doctest失败时是否引发断言错误。默认值为true。
笔记
用户/开发人员可以通过添加 doctests 论据 test() 打电话。例如,为运行所有测试(包括doctest) numpy.lib :
doctests
test()
numpy.lib
>>> np.lib.test(doctests=True)