Mark Dickinson <[EMAIL PROTECTED]> added the comment: There are a couple of problems here. The direct reason for the failure is that there's an earlier doctest (around line 61 of decimal.py) that sets the precision of the current context to 18 instead of its default value of 28.
The obvious fix is to add a line: >>> setcontext(DefaultContext) just after the '>>> from __future__ import with_statement' line (around line 480 of decimal.py), to restore the original context. *but*... that doesn't work, because test_decimal.py clobbers DefaultContext (and it shouldn't, in my opinion). I've attached a patch that might fix these problems, and that also enables this doctest. I'm not sure that this patch is necessarily the best way of going about things, though. ---------- assignee: -> facundobatista keywords: +patch nosy: +facundobatista, marketdickinson Added file: http://bugs.python.org/file10149/decimal_localcontext.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2728> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com