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

Method test_cut

Lib/test/test_peg_generator/test_c_parser.py:210–224  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

208 self.run_test(grammar_source, test_source)
209
210 def test_cut(self) -> None:
211 grammar_source = """
212 start: X ~ Y Z | X Q S
213 X: 'x'
214 Y: 'y'
215 Z: 'z'
216 Q: 'q'
217 S: 's'
218 """
219 test_source = """
220 valid_cases = ["x y z"]
221 invalid_cases = ["x q s"]
222 self.check_input_strings_for_grammar(valid_cases, invalid_cases)
223 """
224 self.run_test(grammar_source, test_source)
225
226 def test_gather(self) -> None:
227 grammar_source = """

Callers

nothing calls this directly

Calls 1

run_testMethod · 0.95

Tested by

no test coverage detected