From c8de7b8ed46ade2156864565570a4b20232dd532 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 12 Oct 2023 13:32:59 +0200 Subject: [PATCH 1/3] gh-107450: Fix parser column offset overflow test on Windows --- Lib/test/test_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index bba2eeb8877730..7d644e6c7499de 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -319,7 +319,7 @@ def baz(): check('def f(*):\n pass', 1, 7) def testMemoryErrorBigSource(self): - with self.assertRaisesRegex(OverflowError, "column offset overflow"): + with self.assertRaisesRegex(OverflowError): exec(f"if True:\n {' ' * 2**31}print('hello world')") @cpython_only From 007a3566bd4ca8c2e6b8a0136eef26adbf70f664 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 12 Oct 2023 13:42:13 +0200 Subject: [PATCH 2/3] Add @bigmemtest and @requires_resource cpu --- Lib/test/test_exceptions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 7d644e6c7499de..4aaf559786b4a4 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -318,6 +318,8 @@ def baz(): 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): exec(f"if True:\n {' ' * 2**31}print('hello world')") From 97d9c5bbb1bfbfdbc5e39f07c0cacff5d720cf64 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 12 Oct 2023 14:18:21 +0200 Subject: [PATCH 3/3] Update Lib/test/test_exceptions.py Co-authored-by: Nikita Sobolev --- Lib/test/test_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 4aaf559786b4a4..5d693939962e1f 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -321,7 +321,7 @@ def baz(): @support.requires_resource('cpu') @support.bigmemtest(support._2G, memuse=1.5) def testMemoryErrorBigSource(self): - with self.assertRaisesRegex(OverflowError): + with self.assertRaises(OverflowError): exec(f"if True:\n {' ' * 2**31}print('hello world')") @cpython_only pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy