summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-03-25 16:59:21 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-03-25 16:59:21 (GMT)
commitfe17b2bc77851be1724f9ce2ea07112a06f413ab (patch)
treeb9d680161ce00c04d494062d66410f321d3f83cb /Lib/test/test_decimal.py
parent1d5617958fa4e3e1039c62cbe15565e642a9e428 (diff)
downloadcpython-fe17b2bc77851be1724f9ce2ea07112a06f413ab.zip
cpython-fe17b2bc77851be1724f9ce2ea07112a06f413ab.tar.gz
cpython-fe17b2bc77851be1724f9ce2ea07112a06f413ab.tar.bz2
Raise MemoryError instead of InvalidOperation/MallocError for compatibility
with decimal.py. The standard specifies InsufficientStorage (MallocError) as a sub-condition of InvalidOperation. This allows a calculation to continue with NaN results when allocation fails.
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 4a352e5..694b959 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -3837,7 +3837,7 @@ class CheckAttributes(unittest.TestCase):
x = dir(C)
y = [s for s in dir(P) if '__' in s or not s.startswith('_')]
- self.assertEqual(set(x) - set(y), {'MallocError'})
+ self.assertEqual(set(x) - set(y), set())
def test_context_attributes(self):