mirror of
https://github.com/python/cpython.git
synced 2025-09-29 19:56:59 +00:00
* bpo-31028: Fix test_pydoc when run directly
Fix get_pydoc_link() of test_pydoc to fix "./python
Lib/test/test_pydoc.py": get the absolute path to __file__ to prevent
relative directories.
* Use realpath() instead of abspath()
(cherry picked from commit fd46561167
)
This commit is contained in:
parent
95b16a9705
commit
d019c7965d
1 changed files with 1 additions and 1 deletions
|
@ -361,7 +361,7 @@ def get_pydoc_html(module):
|
|||
def get_pydoc_link(module):
|
||||
"Returns a documentation web link of a module"
|
||||
dirname = os.path.dirname
|
||||
basedir = dirname(dirname(__file__))
|
||||
basedir = dirname(dirname(os.path.realpath(__file__)))
|
||||
doc = pydoc.TextDoc()
|
||||
loc = doc.getdocloc(module, basedir=basedir)
|
||||
return loc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue