diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-07-29 19:50:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-29 19:50:33 (GMT) |
commit | 990de2f4ca734ddaa196e2af64caafb9c77f29e0 (patch) | |
tree | 761313de3be66dca8b3e9c7aa6d3f0fc82424903 | |
parent | 5753b13cb949b939b2b29cec5e2d646f9a30db44 (diff) | |
download | cpython-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.py | 3 |
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 |