tree-sitter/crates/cli/src/templates/test_binding.py
Robert Muir 8c61bbdb73 feat(bindings): improve python binding test
Previously, the test would not detect ABI incompatibilities.
2025-07-25 13:22:49 +03:00

12 lines
353 B
Python

from unittest import TestCase
from tree_sitter import Language, Parser
import tree_sitter_LOWER_PARSER_NAME
class TestLanguage(TestCase):
def test_can_load_grammar(self):
try:
Parser(Language(tree_sitter_LOWER_PARSER_NAME.language()))
except Exception:
self.fail("Error loading TITLE_PARSER_NAME grammar")