[New-bugs-announce] [issue2728] Failing decimal doctest

Benjamin Peterson report at bugs.python.org
Wed Apr 30 23:28:44 CEST 2008


New submission from Benjamin Peterson <musiccomposition at gmail.com>:

I was removing from __future__ import with_statment in the stdlib when I
came across this disabled doctest in decimal.py:

    # The string below can't be included in the docstring until Python 2.6
    # as the doctest module doesn't understand __future__ statements
    """
    >>> from __future__ import with_statement
    >>> print getcontext().prec
    28
    >>> with localcontext():
    ...     ctx = getcontext()
    ...     ctx.prec += 2
    ...     print ctx.prec
    ...
    30
    >>> with localcontext(ExtendedContext):
    ...     print getcontext().prec
    ...
    9
    >>> print getcontext().prec
    28
    """

When it was enabled, it failed.

----------
components: Library (Lib)
messages: 66026
nosy: benjamin.peterson
severity: normal
status: open
title: Failing decimal doctest
type: behavior
versions: Python 2.6

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2728>
__________________________________


More information about the New-bugs-announce mailing list