diff options
author | Benjamin Peterson <benjamin@python.org> | 2020-09-02 16:29:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 16:29:06 (GMT) |
commit | 3940333637b98a2781869977b077552514784529 (patch) | |
tree | 3b2c264f2acccc540076922a08d7e45e477ad4b1 /Lib | |
parent | 5a4a963a6c798fa9207a9998618a9c0ec3b6b6d7 (diff) | |
download | cpython-3940333637b98a2781869977b077552514784529.zip cpython-3940333637b98a2781869977b077552514784529.tar.gz cpython-3940333637b98a2781869977b077552514784529.tar.bz2 |
closes bpo-41689: Preserve text signature from tp_doc in C heap type creation. (GH-22058)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_capi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 892cc74..db62b47 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -401,6 +401,10 @@ class CAPITest(unittest.TestCase): del L self.assertEqual(PyList.num, 0) + def test_heap_ctype_doc_and_text_signature(self): + self.assertEqual(_testcapi.HeapDocCType.__doc__, "somedoc") + self.assertEqual(_testcapi.HeapDocCType.__text_signature__, "(arg1, arg2)") + def test_subclass_of_heap_gc_ctype_with_tpdealloc_decrefs_once(self): class HeapGcCTypeSubclass(_testcapi.HeapGcCType): def __init__(self): |