def setup_test(): global options, directive global processed_docstrings, processed_signatures options = Struct( inherited_members=False, undoc_members=False, private_members=False, special_members=False, imported_members=False, show_inheritance=False, noindex=False, annotation=None, synopsis='', platform='', deprecated=False, members=[], member_order='alphabetic', exclude_members=set(), ) directive = Struct( env=app.builder.env, genopt=options, result=ViewList(), filename_set=set(), ) processed_docstrings = [] processed_signatures = []
def setup_test(): global options, directive global processed_docstrings, processed_signatures options = Struct( inherited_members = False, undoc_members = False, private_members = False, special_members = False, imported_members = False, show_inheritance = False, noindex = False, annotation = None, synopsis = '', platform = '', deprecated = False, members = [], member_order = 'alphabetic', exclude_members = set(), ignore_module_all = False, ) directive = Struct( env = app.builder.env, genopt = options, result = ViewList(), filename_set = set(), ) processed_docstrings = [] processed_signatures = [] app._status.truncate(0) app._warning.truncate(0) yield AutoDirective._special_attrgetters.clear()
def inliner(new_document): document = new_document() document.reporter.get_source_and_line = lambda line=1: ('dummy.rst', line) return Struct(document=document, reporter=document.reporter)