From 749358b45bd2c9753a40f3aa0f9bd918bf4829d3 Mon Sep 17 00:00:00 2001 From: Matt D'Souza Date: Mon, 3 Jun 2024 12:39:23 -0400 Subject: [PATCH] Disable compiler tests that exceed Bytecode DSL size limits --- graalpython/lib-python/3/test/support/__init__.py | 2 +- graalpython/lib-python/3/test/test_compile.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/graalpython/lib-python/3/test/support/__init__.py b/graalpython/lib-python/3/test/support/__init__.py index b9979b2cdc..f06bcfcae9 100644 --- a/graalpython/lib-python/3/test/support/__init__.py +++ b/graalpython/lib-python/3/test/support/__init__.py @@ -1062,7 +1062,7 @@ def bytecode_dsl_excluded(test): """ try: if sys.implementation.name == 'graalpy' and __graalpython__.is_bytecode_dsl_interpreter: - return unittest.skip("implementation detail not available on the Bytecode DSL interpreter") + return unittest.skip("Not supported by the Bytecode DSL interpreter") except NameError: pass return test diff --git a/graalpython/lib-python/3/test/test_compile.py b/graalpython/lib-python/3/test/test_compile.py index ead7553ade..ccfb6cff58 100644 --- a/graalpython/lib-python/3/test/test_compile.py +++ b/graalpython/lib-python/3/test/test_compile.py @@ -9,7 +9,7 @@ import types import textwrap from test import support -from test.support import script_helper, requires_debug_ranges, impl_detail +from test.support import script_helper, requires_debug_ranges, impl_detail, bytecode_dsl_excluded from test.support.os_helper import FakePath @@ -108,6 +108,7 @@ def __getitem__(self, key): exec('z = a', g, d) self.assertEqual(d['z'], 12) + @bytecode_dsl_excluded def test_extended_arg(self): # default: 1000 * 2.5 = 2500 repetitions repeat = int(sys.getrecursionlimit() * 2.5) @@ -770,6 +771,7 @@ def test_path_like_objects(self): compile("42", FakePath("test_compile_pathlike"), "single") @support.requires_resource('cpu') + @bytecode_dsl_excluded def test_stack_overflow(self): # bpo-31113: Stack overflow when compile a long sequence of # complex statements. @@ -1019,6 +1021,7 @@ async def test(aseq): code_lines = self.get_code_lines(test.__code__) self.assertEqual(expected_lines, code_lines) + @bytecode_dsl_excluded def test_big_dict_literal(self): # The compiler has a flushing point in "compiler_dict" that calls compiles # a portion of the dictionary literal when the loop that iterates over the items