gh-107450: Fix parser column offset overflow test on Windows (#110768)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Lysandros Nikolaou 2023-10-13 09:41:00 +02:00 committed by GitHub
parent 2f59d418cf
commit 05439d3087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -318,8 +318,10 @@ class ExceptionTests(unittest.TestCase):
check('(yield i) = 2', 1, 2)
check('def f(*):\n pass', 1, 7)
@support.requires_resource('cpu')
@support.bigmemtest(support._2G, memuse=1.5)
def testMemoryErrorBigSource(self):
with self.assertRaisesRegex(OverflowError, "column offset overflow"):
with self.assertRaises(OverflowError):
exec(f"if True:\n {' ' * 2**31}print('hello world')")
@cpython_only