File: test_binding.py

package info (click to toggle)
tree-sitter-markdown 0.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,688 kB
  • sloc: ansic: 137,646; javascript: 951; lisp: 79; python: 70; makefile: 46; cpp: 21; sh: 18
file content (17 lines) | stat: -rw-r--r-- 533 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from unittest import TestCase

import tree_sitter, tree_sitter_markdown


class TestLanguage(TestCase):
    def test_can_load_block_grammar(self):
        try:
            tree_sitter.Language(tree_sitter_markdown.language())
        except Exception:
            self.fail("Error loading Markdown block grammar")

    def test_can_load_block_grammar(self):
        try:
            tree_sitter.Language(tree_sitter_markdown.inline_language())
        except Exception:
            self.fail("Error loading Markdown inline grammar")