Skip to content

doctest.OutputChecker with doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS flag cannot match ... with  #141587

@user202729

Description

@user202729

Bug report

Bug description:

import doctest
optflag = doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS
OC = doctest.OutputChecker()

want = """
AB ... CD
"""
got = """
AB  CD
"""
assert not OC.check_output(want, got, optflag)

This is rather unexpected, since substituting the empty string for ... results in a match.

CPython versions tested on:

3.11

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions