summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-07-29 19:50:33 (GMT)
committerGitHub <noreply@github.com>2018-07-29 19:50:33 (GMT)
commit990de2f4ca734ddaa196e2af64caafb9c77f29e0 (patch)
tree761313de3be66dca8b3e9c7aa6d3f0fc82424903
parent5753b13cb949b939b2b29cec5e2d646f9a30db44 (diff)
downloadcpython-990de2f4ca734ddaa196e2af64caafb9c77f29e0.zip
cpython-990de2f4ca734ddaa196e2af64caafb9c77f29e0.tar.gz
cpython-990de2f4ca734ddaa196e2af64caafb9c77f29e0.tar.bz2
bpo-34182: Fix test_pydoc running as a script. (GH-8389)
(cherry picked from commit 4e11c461ed39085b8495a35c9367b46d8a0d306d) Co-authored-by: Bo Bayles <bbayles@gmail.com>
-rw-r--r--Lib/test/test_pydoc.py3
1 files changed, 2 insertions, 1 deletions
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