From 4e11c461ed39085b8495a35c9367b46d8a0d306d Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Sun, 29 Jul 2018 14:15:14 -0500 Subject: bpo-34182: Fix test_pydoc running as a script. (GH-8389) --- Lib/test/test_pydoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 37af664..06f8729 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 -- cgit v0.12