我想通过狮身人面像生成我的项目的autodocumentation。但是,我将在一个没有导入所有模块的环境中运行autodocs。因此,我想嘲笑进口报表。 在http://read-the-docs.readthedocs.io/en/latest/faq.html我发现这招对C模块: import sys
from unittest.mock import MagicMock
class
class Parameters(dict):
""" Some doc here """
pass
class System(object):
Parameter = Parameters
""" The default parameters attribute builder """
def __init__(self):
s