mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-128772: Fix pydoc for methods with __module__ is None (GH-129177)
This commit is contained in:
parent
8b5c8508c7
commit
979d766209
4 changed files with 16 additions and 1 deletions
8
Lib/test/test_pydoc/module_none.py
Normal file
8
Lib/test/test_pydoc/module_none.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
def func():
|
||||
pass
|
||||
func.__module__ = None
|
||||
|
||||
class A:
|
||||
def method(self):
|
||||
pass
|
||||
method.__module__ = None
|
||||
|
|
@ -1903,6 +1903,11 @@ foo
|
|||
html
|
||||
)
|
||||
|
||||
def test_module_none(self):
|
||||
# Issue #128772
|
||||
from test.test_pydoc import module_none
|
||||
pydoc.render_doc(module_none)
|
||||
|
||||
|
||||
class PydocFodderTest(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue