From: Raymond Hettinger Date: Tue, 1 Feb 2011 23:54:43 +0000 (+0000) Subject: Get command-line doctest of Lib/decimal.py to work again. X-Git-Tag: v3.2rc3~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d7e26e95985f83bb0c3c137469af2f7df8936c4;p=python Get command-line doctest of Lib/decimal.py to work again. If tested as '__main__' instead 'decimal', the tracebacks would abbreviate 'decimal.Inexact' as 'Inexact', breaking the doctests. (Reviewed by Antoine.) --- diff --git a/Lib/decimal.py b/Lib/decimal.py index 1fe938f06c..c387de60b6 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -6245,5 +6245,5 @@ _PyHASH_10INV = pow(10, _PyHASH_MODULUS - 2, _PyHASH_MODULUS) if __name__ == '__main__': - import doctest, sys - doctest.testmod(sys.modules[__name__]) + import doctest, decimal + doctest.testmod(decimal)