feat(bindings): improve python binding test

Previously, the test would not detect ABI incompatibilities.
This commit is contained in:
Robert Muir 2025-07-02 22:29:36 -04:00 committed by ObserverOfTime
parent 99988b7081
commit 8c61bbdb73
2 changed files with 28 additions and 10 deletions

View file

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