Bugs item #1192554, was opened at 2005-04-29 19:36 Message generated for change (Settings changed) made by boisgerault You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1192554&group_id=5470
Category: Python Library Group: None >Status: Closed 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() ---------------------------------------- ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2005-04-29 19:52 Message: Logged In: YES user_id=31435 That's true. doctest has few syntax requirements, but the inability to start an expected output block with "..." has always been one of them, and is independent of the ELLIPSIS gimmick. I doubt this will change, in part because the complications needed to "do something about it" are probably pig ugly, in part because it's so rare a desire, and in part because there are easy ways to work around it (like arranging for the expected output to start with something other than '...'). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1192554&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com