mirror of https://github.com/python/cpython.git
[3.11] gh-107450: Fix parser column offset overflow test on Windows (GH-110768) (#110809)
(cherry picked from commit 05439d3087
)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
26748ed4f6
commit
b2a95f694a
|
@ -318,8 +318,10 @@ def baz():
|
||||||
check('(yield i) = 2', 1, 2)
|
check('(yield i) = 2', 1, 2)
|
||||||
check('def f(*):\n pass', 1, 7)
|
check('def f(*):\n pass', 1, 7)
|
||||||
|
|
||||||
def testMemoryErrorBigSource(self):
|
@support.requires_resource('cpu')
|
||||||
with self.assertRaisesRegex(OverflowError, "column offset overflow"):
|
@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')")
|
exec(f"if True:\n {' ' * 2**31}print('hello world')")
|
||||||
|
|
||||||
@cpython_only
|
@cpython_only
|
||||||
|
|
Loading…
Reference in New Issue