def check_output(self, want, got, optionflags):
<EOL>if got == want:<EOL><INDENT>return True<EOL><DEDENT>if not (optionflags & DONT_ACCEPT_TRUE_FOR_1):<EOL><INDENT>if (got,want) == ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return True<EOL><DEDENT>if (got,want) == ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>if not (optionflags & DONT_ACCEPT_BLANKLINE):<EOL><INDENT>want = re.sub('<STR_LIT>' % re.escape(BLANKLINE_MARKER),<EOL>'<STR_LIT>', want)<EOL>got = re.sub('<STR_LIT>', '<STR_LIT>', got)<EOL>if got == want:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>if optionflags & NORMALIZE_WHITESPACE:<EOL><INDENT>got = '<STR_LIT:U+0020>'.join(got.split())<EOL>want = '<STR_LIT:U+0020>'.join(want.split())<EOL>if got == want:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>if optionflags & ELLIPSIS:<EOL><INDENT>if _ellipsis_match(want, got):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Return True iff the actual output from an example (`got`)
matches the expected output (`want`).  These strings are
always considered to match if they are identical; but
depending on what option flags the test runner is using,
several non-exact match types are also possible.  See the
documentation for `TestRunner` for more information about
option flags.