Message70391
| 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:17 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, pitrou, benjamin.peterson |
| 2008年07月29日 13:30:17 | amaury.forgeotdarc | set | messageid: <1217338217.45.0.494421902789.issue3462@psf.upfronthosting.co.za> |
| 2008年07月29日 13:30:16 | amaury.forgeotdarc | link | issue3462 messages |
| 2008年07月29日 13:30:16 | amaury.forgeotdarc | create |
|