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.)
This commit is contained in:
Raymond Hettinger 2011-02-01 23:54:43 +00:00
parent 19cc9e183f
commit 6d7e26e959
1 changed files with 2 additions and 2 deletions

View File

@ -6245,5 +6245,5 @@ _PyHASH_10INV = pow(10, _PyHASH_MODULUS - 2, _PyHASH_MODULUS)
if __name__ == '__main__': if __name__ == '__main__':
import doctest, sys import doctest, decimal
doctest.testmod(sys.modules[__name__]) doctest.testmod(decimal)