From 5f808318730f55affca25c85d413411e5954fb7c Mon Sep 17 00:00:00 2001 From: Tai An Date: Thu, 10 Sep 2026 21:03:45 -0700 Subject: [PATCH] test[cartesian]: un-shadow the duplicate test_enum_runtime test_enum_runtime is defined twice at module level in test_code_generation.py (L1868 and L1896). Python keeps only the last binding, so pytest collects a single test and the first definition -- the one that actually exercises the @gtscript.enum MyEnum runtime parameter (enum comparison and multi-interval enum assignment) -- is silently dropped and never runs. The second definition takes a bool parameter (done: bool) and tests a boolean runtime argument, so it is really a separate test that was mis-named. Rename it to test_bool_runtime so both tests are collected and run. AST check on the file: 60 module-level test_ defs but only 59 unique names before; 60 unique after the rename. --- .../multi_feature_tests/test_code_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cartesian_tests/integration_tests/multi_feature_tests/test_code_generation.py b/tests/cartesian_tests/integration_tests/multi_feature_tests/test_code_generation.py index 365270671a..a6f75f8a91 100644 --- a/tests/cartesian_tests/integration_tests/multi_feature_tests/test_code_generation.py +++ b/tests/cartesian_tests/integration_tests/multi_feature_tests/test_code_generation.py @@ -1893,7 +1893,7 @@ def the_stencil(out_field: Field[int], order: MyEnum): # type: ignore @pytest.mark.parametrize("backend", ALL_BACKENDS) -def test_enum_runtime(backend): +def test_bool_runtime(backend): @gtscript.stencil(backend=backend) def the_stencil(out_field: Field[int], done: bool): # type: ignore