def runintrospecter(s, attribs='', introspect=None, exclude=''):
    """
    This test function takes a string containing the contents of a
    module.  It writes the string contents to a file, imports the file
    as a module, and uses C{introspect_docs} to introspect it, and
    pretty prints the resulting ModuleDoc object.  The C{attribs}
    argument specifies which attributes of the C{APIDoc}s should be
    displayed.  The C{introspect} argument gives the name of a variable
    in the module whose value should be introspected, instead of
    introspecting the whole module.
    """
    # Write it to a temp file.
    tmp_dir = write_pystring_to_tmp_dir(s)
    # Import it.
    sys.path.insert(0, tmp_dir)
    if introspect is None:
        import epydoc_test as val
    else:
        exec(introspect % "from epydoc_test import %s as val")
    del sys.path[0]
    # Introspect it.
    val_doc = introspect_docs(val)
    # Display it.
    s = val_doc.pp(include=attribs.split(),exclude=exclude.split())
    s = re.sub(r"(filename = ).*", r"\1...", s)
    s = re.sub(r"(<module 'epydoc_test' from ).*", r'\1...', s)
    s = re.sub(r"(<function \w+ at )0x\w+>", r"\1...>", s)
    s = re.sub(r"(<\w+ object at )0x\w+>", r"\1...>", s)
    print s
    # Clean up.
    cleanup_tmp_dir(tmp_dir)
dataset/ETHPy150Open CollabQ/CollabQ/vendor/epydoc/test/util.py/runintrospecter/swapped operands of `%`