mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-20185: Convert list object implementation to Argument Clinic. (#542)
This commit is contained in:
parent
0710d75425
commit
fdd42c481e
3 changed files with 529 additions and 156 deletions
|
@ -58,7 +58,7 @@ class Get_signatureTest(unittest.TestCase):
|
|||
'Create and return a new object. See help(type) for accurate signature.')
|
||||
gtest(list.__init__,
|
||||
'Initialize self. See help(type(self)) for accurate signature.')
|
||||
append_doc = "L.append(object) -> None -- append object to end"
|
||||
append_doc = "Append object to the end of the list."
|
||||
gtest(list.append, append_doc)
|
||||
gtest([].append, append_doc)
|
||||
gtest(List.append, append_doc)
|
||||
|
@ -81,9 +81,9 @@ class Get_signatureTest(unittest.TestCase):
|
|||
|
||||
def test_multiline_docstring(self):
|
||||
# Test fewer lines than max.
|
||||
self.assertEqual(signature(list),
|
||||
"list() -> new empty list\n"
|
||||
"list(iterable) -> new list initialized from iterable's items")
|
||||
self.assertEqual(signature(range),
|
||||
"range(stop) -> range object\n"
|
||||
"range(start, stop[, step]) -> range object")
|
||||
|
||||
# Test max lines
|
||||
self.assertEqual(signature(bytes), '''\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue