mirror of
https://github.com/python/cpython.git
synced 2025-08-29 05:05:03 +00:00
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.
This commit is contained in:
parent
1d5617958f
commit
fe17b2bc77
2 changed files with 9 additions and 2 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue