【发布时间】:2014-05-06 01:41:37
【问题描述】:
我正在使用 docstrings 和 autodoc 为我使用 Sphinx 的项目构建文档。我喜欢在我的文档中包含测试类和实际测试用例的描述,但我想省略 setUp 和 tearDown。我尝试在 .rst 文件中指定它,但我这不起作用(并不是我真正期望的那样,我相当确定 undoc-members 仅适用于顶级构造 - 全局函数和类)
API.tests.test_MSSQLTools module
--------------------------------
.. automodule:: API.tests.test_MSSQLTools
:members:
:undoc-members: setUp, tearDown
:show-inheritance:
有谁知道设置 sphinx 的方法,这样 setUp 和 tearDown 方法甚至不会出现在文档中?
【问题讨论】:
标签: python python-sphinx