From c5f034e1af07e6fab7c65434666218d6e24cd98b Mon Sep 17 00:00:00 2001 From: dontmindaditya Date: Tue, 14 Apr 2026 00:52:07 -0700 Subject: [PATCH] updates --- tests/test_multilang.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_multilang.py b/tests/test_multilang.py index 86ff4a8..6db7820 100644 --- a/tests/test_multilang.py +++ b/tests/test_multilang.py @@ -3,12 +3,22 @@ from pathlib import Path import pytest +import tree_sitter_language_pack as tslp from code_review_graph.parser import CodeParser FIXTURES = Path(__file__).parent / "fixtures" +@pytest.fixture(scope="class") +def lua_available(): + try: + tslp.get_parser("lua") + return True + except Exception: + return False + + class TestGoParsing: def setup_method(self): self.parser = CodeParser() @@ -688,6 +698,11 @@ def test_finds_contains(self): class TestLuaParsing: + @pytest.fixture(autouse=True) + def check_lua_available(self, lua_available): + if not lua_available: + pytest.skip("Lua grammar not available (blocked by Application Control policy)") + def setup_method(self): self.parser = CodeParser() self.nodes, self.edges = self.parser.parse_file(FIXTURES / "sample.lua")