From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 13 Oct 2023 08:32:42 +0000 (+0200) Subject: [3.11] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) ... X-Git-Tag: v3.11.7~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2a95f694a81d75fbdbc60c111c0557edd2ea81c;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) (#110809) (cherry picked from commit 05439d308740b621d03562451a7608eb725937ae) Co-authored-by: Lysandros Nikolaou Co-authored-by: Nikita Sobolev --- diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 7f6eaa34e114..c7c63e5e4ae2 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