def toc(self):
fails = "<STR_LIT>"<EOL>skips = "<STR_LIT>"<EOL>if len(self.failed()):<EOL><INDENT>faillist = list()<EOL>for failure in self.failed():<EOL><INDENT>faillist.append(<EOL>"""<STR_LIT>""".format(anchor=failure.anchor(),<EOL>name=tag.text(<EOL>failure.testclass.name + '<STR_LIT:.>' + failure.name)))<EOL><DEDENT>fails = """<STR_LIT>""".format(faillist="<STR_LIT>".join(faillist))<EOL><DEDENT>if len(self.skipped()):<EOL><INDENT>skiplist = list()<EOL>for skipped in self.skipped():<EOL><INDENT>skiplist.append(<EOL>"""<STR_LIT>""".format(anchor=skipped.anchor(),<EOL>name=tag.text(<EOL>skipped.testclass.name + skipped.name)))<EOL><DEDENT>skips = """<STR_LIT>""".format(skiplist="<STR_LIT>".join(skiplist))<EOL><DEDENT>classlist = list()<EOL>for classname in self.classes:<EOL><INDENT>testclass = self.classes[classname]<EOL>cases = list()<EOL>for testcase in testclass.cases:<EOL><INDENT>if "<STR_LIT>" in testcase.name:<EOL><INDENT>assert True<EOL><DEDENT>cases.append(<EOL>"""<STR_LIT>""".format(anchor=testcase.anchor(),<EOL>name=tag.text(testcase.name)))<EOL><DEDENT>classlist.append("""<STR_LIT>""".format(anchor=testclass.anchor(),<EOL>name=testclass.name,<EOL>cases="<STR_LIT>".join(cases)))<EOL><DEDENT>return """<STR_LIT>""".format(failed=fails,<EOL>skips=skips,<EOL>classlist="<STR_LIT>".join(classlist))<EOL>
Return a html table of contents
:return: