Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,20 @@ def test_no_c_basename_cloned(self):
err = "No C basename provided after 'as' keyword"
self.expect_failure(block, err, lineno=5)

def test_cloned_with_custom_c_basename(self):
raw = dedent("""
/*[clinic input]
foo2
[clinic start generated code]*/
/*[clinic input]
foo as foo1 = foo2
[clinic start generated code]*/
""")
self.clinic.parse(raw)
funcs = self.clinic.functions
self.assertEqual(len(funcs), 2)
self.assertEqual(funcs[1].name, "foo")
self.assertEqual(funcs[1].c_basename, "foo1")


class ParseFileUnitTest(TestCase):
Expand Down