summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 7c607f9..a76b505 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -1303,6 +1303,12 @@ class DecimalUsabilityTest(unittest.TestCase):
d = d1.max(d2)
self.assertTrue(type(d) is Decimal)
+ def test_implicit_context(self):
+ # Check results when context given implicitly. (Issue 2478)
+ c = getcontext()
+ self.assertEqual(str(Decimal(0).sqrt()),
+ str(c.sqrt(Decimal(0))))
+
class DecimalPythonAPItests(unittest.TestCase):