summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-13 08:31:39 (GMT)
committerGitHub <noreply@github.com>2023-10-13 08:31:39 (GMT)
commit08242cdd7bd65865a6f1000671e958cf687b4f45 (patch)
treee1c205f038c71fadc3dff19052eb58eeb980e641 /Lib/test/test_exceptions.py
parent27d5ea291c16bcdfaad25e2e371c2ba3d591ed37 (diff)
downloadcpython-08242cdd7bd65865a6f1000671e958cf687b4f45.zip
cpython-08242cdd7bd65865a6f1000671e958cf687b4f45.tar.gz
cpython-08242cdd7bd65865a6f1000671e958cf687b4f45.tar.bz2
[3.12] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) (#110808)
(cherry picked from commit 05439d308740b621d03562451a7608eb725937ae) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 5d46098..9de7e73 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -318,8 +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"):
+ @support.requires_resource('cpu')
+ @support.bigmemtest(support._2G, memuse=1.5)
+ def testMemoryErrorBigSource(self, _size):
+ with self.assertRaises(OverflowError):
exec(f"if True:\n {' ' * 2**31}print('hello world')")
@cpython_only