tests/test-doctest.py
changeset 51746 4f0fad8da04c
parent 49872 40060267df22
child 51919 ceaf92d6d380
equal deleted inserted replaced
51745:e679697a6ca4 51746:4f0fad8da04c
    19         #      <exc.name>: <others> -> <name>: <others>
    19         #      <exc.name>: <others> -> <name>: <others>
    20         got2 = re.sub(
    20         got2 = re.sub(
    21             r'''^mercurial\.\w+\.(\w+): (['"])(.*?)\2''',
    21             r'''^mercurial\.\w+\.(\w+): (['"])(.*?)\2''',
    22             r'\1: \3',
    22             r'\1: \3',
    23             got2,
    23             got2,
    24             re.MULTILINE,
    24             flags=re.MULTILINE,
    25         )
    25         )
    26         got2 = re.sub(r'^mercurial\.\w+\.(\w+): ', r'\1: ', got2, re.MULTILINE)
    26         got2 = re.sub(
       
    27             r'^mercurial\.\w+\.(\w+): ', r'\1: ', got2, flags=re.MULTILINE
       
    28         )
    27         return any(
    29         return any(
    28             doctest.OutputChecker.check_output(self, w, g, optionflags)
    30             doctest.OutputChecker.check_output(self, w, g, optionflags)
    29             for w, g in [(want, got), (want2, got2)]
    31             for w, g in [(want, got), (want2, got2)]
    30         )
    32         )
    31 
    33