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:
parent
19cc9e183f
commit
6d7e26e959
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue