We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e04d3b6 commit 90ba4dfCopy full SHA for 90ba4df
1 file changed
Lib/test/test_marshal.py
@@ -458,12 +458,10 @@ def test_loads_dict_no_memory(self):
458
# allocation that registers it in the reference list failed.
459
data = b'\xfbi\x01\x00\x00\x00i\x02\x00\x00\x000' # {1: 2}, FLAG_REF
460
self.assertEqual(marshal.loads(data), {1: 2})
461
- # The reference-list allocation fails early; 16 is ample headroom.
462
for index in range(16):
463
with self.subTest(index=index):
464
- # Capture the outcome before touching memory again: any
465
- # allocation made by an assertion would also fail while the
466
- # nomemory hook is active.
+ # Capture the outcome first: an assertion would itself
+ # allocate and fail while the nomemory hook is active.
467
result = error = None
468
_testcapi.set_nomemory(index, index + 1)
469
try:
0 commit comments