Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
aeb2e829
Commit
aeb2e829
authored
Mar 31, 2010
by
Brian Curtin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #8225. xml.etree was displaying an incorrect link when viewed in help.
parent
b102ddad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Lib/pydoc.py
Lib/pydoc.py
+2
-1
Lib/test/test_pydoc.py
Lib/test/test_pydoc.py
+6
-0
No files found.
Lib/pydoc.py
View file @
aeb2e829
...
...
@@ -356,7 +356,8 @@ class Doc:
'marshal'
,
'posix'
,
'signal'
,
'sys'
,
'thread'
,
'zipimport'
)
or
(
file
.
startswith
(
basedir
)
and
not
file
.
startswith
(
os
.
path
.
join
(
basedir
,
'site-packages'
))))):
not
file
.
startswith
(
os
.
path
.
join
(
basedir
,
'site-packages'
))))
and
object
.
__name__
not
in
(
'xml.etree'
)):
if
docloc
.
startswith
(
"http://"
):
docloc
=
"%s/%s"
%
(
docloc
.
rstrip
(
"/"
),
object
.
__name__
)
else
:
...
...
Lib/test/test_pydoc.py
View file @
aeb2e829
...
...
@@ -7,6 +7,7 @@ import re
import
pydoc
import
inspect
import
unittest
import
xml.etree
import
test.test_support
from
contextlib
import
contextmanager
from
test.test_support
import
(
...
...
@@ -244,6 +245,11 @@ class PyDocDocTest(unittest.TestCase):
print_diffs
(
expected_text
,
result
)
self
.
fail
(
"outputs are not equal, see diff above"
)
def
test_issue8225
(
self
):
# Test issue8225 to ensure no doc link appears for xml.etree
result
,
doc_loc
=
get_pydoc_text
(
xml
.
etree
)
self
.
assertEqual
(
doc_loc
,
""
,
"MODULE DOCS incorrectly includes a link"
)
def
test_not_here
(
self
):
missing_module
=
"test.i_am_not_here"
result
=
run_pydoc
(
missing_module
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment