bpo-41832: PyType_FromModuleAndSpec() now accepts NULL tp_doc (GH-23123)

This commit is contained in:
Hai Shi 2020-11-07 00:04:47 +08:00 committed by GitHub
parent 803187796f
commit 88c2cfd9ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 4 deletions

View file

@ -405,6 +405,9 @@ class CAPITest(unittest.TestCase):
self.assertEqual(_testcapi.HeapDocCType.__doc__, "somedoc")
self.assertEqual(_testcapi.HeapDocCType.__text_signature__, "(arg1, arg2)")
def test_null_type_doc(self):
self.assertEqual(_testcapi.NullTpDocType.__doc__, None)
def test_subclass_of_heap_gc_ctype_with_tpdealloc_decrefs_once(self):
class HeapGcCTypeSubclass(_testcapi.HeapGcCType):
def __init__(self):