tree-sitter/cli/src/templates/test_binding.py
Amaan Qureshi b2359e4020 feat!: move generation of grammar files to an init command
The generate subcommand should stick to solely generating a parser and
headers.
2024-09-27 16:06:57 -04:00

11 lines
329 B
Python

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