原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.rundocs.html
校对:(虚位以待)
numpy.testing.rundocs(filename=None, raise_on_error=True)[source]运行在给定文件中找到的doctests。
默认情况下,rundocs会在失败时引发AssertionError。
| 参数: | filename:str
raise_on_error:bool
|
|---|
笔记
用户/开发人员可以通过向test()调用添加doctests参数来运行doctests。例如,要运行numpy.lib的所有测试(包括doctests):
>>> np.lib.test(doctests=True)