(self, grammar_source, test_source)
| 135 | generate_parser_c_extension(grammar, Path('.'), library_dir=self.library_dir) |
| 136 | |
| 137 | def run_test(self, grammar_source, test_source): |
| 138 | self.build_extension(grammar_source) |
| 139 | test_source = textwrap.indent(textwrap.dedent(test_source), 8 * " ") |
| 140 | assert_python_ok( |
| 141 | "-c", |
| 142 | TEST_TEMPLATE.format(extension_path=self.tmp_path, test_source=test_source), |
| 143 | ) |
| 144 | |
| 145 | def test_c_parser(self) -> None: |
| 146 | grammar_source = """ |
no test coverage detected