[ python-Bugs-1192554 ] doctest's ELLIPSIS and multiline statements
SourceForge.net
noreply at sourceforge.net
Fri Apr 29 19:36:31 CEST 2005
Bugs item #1192554, was opened at 2005-04-29 19:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1192554&group_id=5470
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Sébastien Boisgérault (boisgerault)
Assigned to: Nobody/Anonymous (nobody)
Summary: doctest's ELLIPSIS and multiline statements
Initial Comment:
The doctest ELLPSIS marker (default: "...") may be
confused by the doctest parser with the multiline
statement marker ("...").
Example: in the following code, the intent was to accept
any result after "print 42". This is NOT a multiline
statement,
but however the test fails (Expected: nothing, Got: 42).
----------------------------------------
#!/usr/bin/env python
import doctest
def test():
"""
>>> print 42 #doctest: +ELLIPSIS
...
"""
def run():
"Run the test."
doctest.testmod()
if __name__ == '__main__':
run()
----------------------------------------
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1192554&group_id=5470
More information about the Python-bugs-list
mailing list