[New-bugs-announce] [issue3955] maybe doctest doesn't understand unicode_literals?

Mark Summerfield report at bugs.python.org
Wed Sep 24 14:38:22 CEST 2008

New submission from Mark Summerfield <mark at qtrac.eu>:

# This program works fine with Python 2.5 and 2.6:
def f():
    >>> f()
    return "xyz"

if __name__ == "__main__":
    import doctest

But if you put the statement "from __future__ import unicode_literals"
at the start then it fails:
File "/tmp/test.py", line 5, in __main__.f
Failed example:

I don't know if it is a bug or a feature but I didn't see any mention of
it in the bugs or docs so thought I'd mention it.

components: Library (Lib)
messages: 73710
nosy: mark
severity: normal
status: open
title: maybe doctest doesn't understand unicode_literals?
type: behavior
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list