diff options
author | Raymond Hettinger <python@rcn.com> | 2011-02-01 23:54:43 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-02-01 23:54:43 (GMT) |
commit | 6d7e26e95985f83bb0c3c137469af2f7df8936c4 (patch) | |
tree | c75e479fae7952f8fa81c9649356900ec7e2bf1c | |
parent | 19cc9e183fabce48afade79f3598f277cab8cf0b (diff) | |
download | cpython-6d7e26e95985f83bb0c3c137469af2f7df8936c4.zip cpython-6d7e26e95985f83bb0c3c137469af2f7df8936c4.tar.gz cpython-6d7e26e95985f83bb0c3c137469af2f7df8936c4.tar.bz2 |
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.)
-rw-r--r-- | Lib/decimal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 1fe938f..c387de6 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) |