mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-113317: Add Codegen class to Argument Clinic (#117626)
* Move ifndef_symbols, includes and add_include() from Clinic to Codegen. Add a 'codegen' (Codegen) attribute to Clinic. * Remove libclinic.crenderdata module: move code to libclinic.codegen. * BlockPrinter.print_block(): remove unused 'limited_capi' argument. Remove also 'core_includes' parameter. * Add get_includes() methods. * Make Codegen.ifndef_symbols private. * Make Codegen.includes private. * Make CConverter.includes private.
This commit is contained in:
parent
d4963871b0
commit
a2ae84726b
8 changed files with 183 additions and 180 deletions
|
@ -877,9 +877,8 @@ class ClinicBlockParserTest(TestCase):
|
|||
|
||||
blocks = list(BlockParser(input, language))
|
||||
writer = BlockPrinter(language)
|
||||
c = _make_clinic()
|
||||
for block in blocks:
|
||||
writer.print_block(block, limited_capi=c.limited_capi, header_includes=c.includes)
|
||||
writer.print_block(block)
|
||||
output = writer.f.getvalue()
|
||||
assert output == input, "output != input!\n\noutput " + repr(output) + "\n\n input " + repr(input)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue