[Python-checkins] bpo-34182: Fix test_pydoc running as a script. (GH-8389)

Serhiy Storchaka webhook-mailer at python.org
Sun Jul 29 15:15:17 EDT 2018


https://github.com/python/cpython/commit/4e11c461ed39085b8495a35c9367b46d8a0d306d
commit: 4e11c461ed39085b8495a35c9367b46d8a0d306d
branch: master
author: Bo Bayles <bbayles at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2018年07月29日T22:15:14+03:00
summary:
bpo-34182: Fix test_pydoc running as a script. (GH-8389)
files:
M Lib/test/test_pydoc.py
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


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /