bpo-34182: Fix test_pydoc running as a script. (GH-8389)

This commit is contained in:
Bo Bayles 2018-07-29 14:15:14 -05:00 committed by Serhiy Storchaka
parent 3f8c6913b8
commit 4e11c461ed

View file

@ -357,8 +357,9 @@ def get_pydoc_html(module):
def get_pydoc_link(module):
"Returns a documentation web link of a module"
abspath = os.path.abspath
dirname = os.path.dirname
basedir = dirname(dirname(__file__))
basedir = dirname(dirname(abspath(__file__)))
doc = pydoc.TextDoc()
loc = doc.getdocloc(module, basedir=basedir)
return loc