summaryrefslogtreecommitdiff
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-02-01 23:54:43 +0000
committerRaymond Hettinger <python@rcn.com>2011-02-01 23:54:43 +0000
commit6d7e26e95985f83bb0c3c137469af2f7df8936c4 (patch)
treec75e479fae7952f8fa81c9649356900ec7e2bf1c /Lib/decimal.py
parent19cc9e183fabce48afade79f3598f277cab8cf0b (diff)
downloadcpython-git-6d7e26e95985f83bb0c3c137469af2f7df8936c4.tar.gz
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.)
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py4
1 files changed, 2 insertions, 2 deletions
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)