]> granicus.if.org Git - python/commitdiff
bpo-34182: Fix test_pydoc running as a script. (GH-8389)
authorBo Bayles <bbayles@gmail.com>
Sun, 29 Jul 2018 19:15:14 +0000 (14:15 -0500)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 29 Jul 2018 19:15:14 +0000 (22:15 +0300)
Lib/test/test_pydoc.py

index 37af6643f6dcfb094e882a1aa7074d69c1f5641d..06f872999515fba6e67fc0ade6f5fa03f7a0b6ff 100644 (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