https://github.com/python/cpython/commit/4e11c461ed39085b8495a35c9367b46d8a0... commit: 4e11c461ed39085b8495a35c9367b46d8a0d306d branch: master author: Bo Bayles <bbayles@gmail.com> committer: Serhiy Storchaka <storchaka@gmail.com> date: 2018-07-29T22:15:14+03:00 summary: bpo-34182: Fix test_pydoc running as a script. (GH-8389) files: M Lib/test/test_pydoc.py diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 37af6643f6dc..06f872999515 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -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