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

Method test_directive

Lib/test/test_clinic.py:2451–2457  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2449 self.expect_failure(block, err)
2450
2451 def test_directive(self):
2452 parser = DSLParser(_make_clinic())
2453 parser.flag = False
2454 parser.directives['setflag'] = lambda : setattr(parser, 'flag', True)
2455 block = Block("setflag")
2456 parser.parse(block)
2457 self.assertTrue(parser.flag)
2458
2459 def test_legacy_converters(self):
2460 block = self.parse('module os\nos.access\n path: "s"')

Callers

nothing calls this directly

Calls 5

parseMethod · 0.95
DSLParserClass · 0.90
BlockClass · 0.90
_make_clinicFunction · 0.85
assertTrueMethod · 0.80

Tested by

no test coverage detected