diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2015-04-13 23:22:35 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2015-04-13 23:22:35 (GMT) |
commit | 8ef887ce47421e0e3e9ec0c95735990bb0594ffe (patch) | |
tree | 3a547c2984fd7086cc1d7a7840734bf7ae94baff /Lib/test/test_capi.py | |
parent | a6cc551502aac1fd011009abe40686f4647ba6b0 (diff) | |
download | cpython-8ef887ce47421e0e3e9ec0c95735990bb0594ffe.zip cpython-8ef887ce47421e0e3e9ec0c95735990bb0594ffe.tar.gz cpython-8ef887ce47421e0e3e9ec0c95735990bb0594ffe.tar.bz2 |
Issue #20586: Argument Clinic now ensures signatures on functions without docstrings.
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index dff717b..367feaa 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -123,7 +123,7 @@ class CAPITest(unittest.TestCase): self.assertEqual(_testcapi.no_docstring.__doc__, None) self.assertEqual(_testcapi.no_docstring.__text_signature__, None) - self.assertEqual(_testcapi.docstring_empty.__doc__, "") + self.assertEqual(_testcapi.docstring_empty.__doc__, None) self.assertEqual(_testcapi.docstring_empty.__text_signature__, None) self.assertEqual(_testcapi.docstring_no_signature.__doc__, @@ -150,6 +150,10 @@ class CAPITest(unittest.TestCase): "This docstring has a valid signature.") self.assertEqual(_testcapi.docstring_with_signature.__text_signature__, "($module, /, sig)") + self.assertEqual(_testcapi.docstring_with_signature_but_no_doc.__doc__, None) + self.assertEqual(_testcapi.docstring_with_signature_but_no_doc.__text_signature__, + "($module, /, sig)") + self.assertEqual(_testcapi.docstring_with_signature_and_extra_newlines.__doc__, "\nThis docstring has a valid signature and some extra newlines.") self.assertEqual(_testcapi.docstring_with_signature_and_extra_newlines.__text_signature__, |