From: Bo Bayles Date: Sun, 29 Jul 2018 19:15:14 +0000 (-0500) Subject: bpo-34182: Fix test_pydoc running as a script. (GH-8389) X-Git-Tag: v3.8.0a1~1283 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e11c461ed39085b8495a35c9367b46d8a0d306d;p=thirdparty%2FPython%2Fcpython.git bpo-34182: Fix test_pydoc running as a script. (GH-8389) --- 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