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.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 05a89e7..bba2eeb 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -318,6 +318,10 @@ class ExceptionTests(unittest.TestCase):
check('(yield i) = 2', 1, 2)
check('def f(*):\n pass', 1, 7)
+ def testMemoryErrorBigSource(self):
+ with self.assertRaisesRegex(OverflowError, "column offset overflow"):
+ exec(f"if True:\n {' ' * 2**31}print('hello world')")
+
@cpython_only
def testSettingException(self):
# test that setting an exception at the C level works even if the