Skip to content

Commit 4e11c46

Browse files
bbaylesserhiy-storchaka
authored andcommitted
bpo-34182: Fix test_pydoc running as a script. (GH-8389)
1 parent 3f8c691 commit 4e11c46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_pydoc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,9 @@ def get_pydoc_html(module):
357357

358358
def get_pydoc_link(module):
359359
"Returns a documentation web link of a module"
360+
abspath = os.path.abspath
360361
dirname = os.path.dirname
361-
basedir = dirname(dirname(__file__))
362+
basedir = dirname(dirname(abspath(__file__)))
362363
doc = pydoc.TextDoc()
363364
loc = doc.getdocloc(module, basedir=basedir)
364365
return loc

0 commit comments

Comments
 (0)