summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-11-07 22:47:19 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-11-07 22:47:19 (GMT)
commited16eff57eaf5c89057f8da6328785fd887c01df (patch)
tree81a8ef54df0e9db30f5acf4ee1f6e338e850443c /Lib/test/test_decimal.py
parentf4abc7b8a016da5b1783f471f2f376d7e9c27d60 (diff)
downloadcpython-ed16eff57eaf5c89057f8da6328785fd887c01df.zip
cpython-ed16eff57eaf5c89057f8da6328785fd887c01df.tar.gz
cpython-ed16eff57eaf5c89057f8da6328785fd887c01df.tar.bz2
Issue #16431: Also fix the opposite direction.
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 99faf78..ea18c63 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -2052,6 +2052,10 @@ class UsabilityTest(unittest.TestCase):
self.assertIs(type(b), MyDecimal)
self.assertEqual(a, b)
+ c = Decimal(b)
+ self.assertIs(type(c), Decimal)
+ self.assertEqual(a, c)
+
def test_implicit_context(self):
Decimal = self.decimal.Decimal
getcontext = self.decimal.getcontext