summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 95c2dd1..5ce76f1 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -593,9 +593,10 @@ class ExceptionTests(unittest.TestCase):
# PyErr_NoMemory always raises the same exception instance.
# Check that the traceback is not doubled.
import traceback
+ from _testcapi import raise_memoryerror
def raiseMemError():
try:
- "a" * (sys.maxsize // 2)
+ raise_memoryerror()
except MemoryError as e:
tb = e.__traceback__
else: