由于“from X import Y”

问题描述

我有一个项目设置为通过 doctests 从 Sphinx 运行 automodule

然而,似乎不仅模块的测试得到运行,任何具有以下语法的东西也得到运行:

from some.module.path import foobar

这会导致 foobar 的 doctest 也在运行,这是我们不希望看到的。

有没有办法禁用它,并确保只运行给定文件声明的doctests?

Doctests 通过:

coverage3 run -m sphinx -b doctest docs/source docs/build/doctest

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)