MCPcopy Index your code
hub / github.com/python/cpython / run_test

Method run_test

Lib/test/test_peg_generator/test_c_parser.py:137–143  ·  view source on GitHub ↗
(self, grammar_source, test_source)

Source from the content-addressed store, hash-verified

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 = """

Callers 15

test_c_parserMethod · 0.95
test_lookaheadMethod · 0.95
test_cutMethod · 0.95
test_gatherMethod · 0.95
test_left_recursionMethod · 0.95
test_pass_stmt_actionMethod · 0.95

Calls 5

build_extensionMethod · 0.95
assert_python_okFunction · 0.90
indentMethod · 0.45
dedentMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected