This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, benjamin.peterson, pitrou
Date 2008-07-29.13:30:16
SpamBayes Score 0.012904692
Marked as misclassified No
Message-id <1217338217.45.0.494421902789.issue3462@psf.upfronthosting.co.za>
In-reply-to
Content
Bingo! doctest sets the __builtins__._ variable,
and the last doctest in decimal.py (in lexicographic order) is
Decimal.__round__, which ends with
        >>> round(Decimal('sNaN123'), 0)
        Decimal('NaN123')
This is the value you see in Benjamin's output.

Here is a trivial patch:

Index: Lib/test/regrtest.py
===================================================================
--- Lib/test/regrtest.py        (revision 65283)
+++ Lib/test/regrtest.py        (working copy)
@@ -647,6 +647,8 @@
 def cleanup_test_droppings(testname, verbose):
     import shutil

+    __builtins__._ = None
+
     # Try to clean up junk commonly left behind.  While tests shouldn't
leave
     # any files or directories behind, when a test fails that can be
tedious
     # for it to arrange.  The consequences can be especially nasty on
Windows,
History
Date User Action Args
2008-07-29 13:30:17amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, pitrou, benjamin.peterson
2008-07-29 13:30:17amaury.forgeotdarcsetmessageid: <1217338217.45.0.494421902789.issue3462@psf.upfronthosting.co.za>
2008-07-29 13:30:16amaury.forgeotdarclinkissue3462 messages
2008-07-29 13:30:16amaury.forgeotdarccreate