[Python-checkins] r79520 - in python/branches/py3k: Lib/pydoc.py Lib/test/test_pydoc.py
brian.curtin
python-checkins at python.org
Wed Mar 31 05:19:28 CEST 2010
Author: brian.curtin
Date: Wed Mar 31 05:19:28 2010
New Revision: 79520
Log:
Merged revisions 79518 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79518 | brian.curtin | 2010-03-30 22:10:21 -0500 (Tue, 30 Mar 2010) | 2 lines
Fix #8225. xml.etree was displaying an incorrect link when viewed in help.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/pydoc.py
python/branches/py3k/Lib/test/test_pydoc.py
Modified: python/branches/py3k/Lib/pydoc.py
==============================================================================
--- python/branches/py3k/Lib/pydoc.py (original)
+++ python/branches/py3k/Lib/pydoc.py Wed Mar 31 05:19:28 2010
@@ -349,7 +349,8 @@
'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:
Modified: python/branches/py3k/Lib/test/test_pydoc.py
==============================================================================
--- python/branches/py3k/Lib/test/test_pydoc.py (original)
+++ python/branches/py3k/Lib/test/test_pydoc.py Wed Mar 31 05:19:28 2010
@@ -8,6 +8,7 @@
import inspect
import unittest
import test.support
+import xml.etree
from contextlib import contextmanager
from test.support import (
TESTFN, forget, rmtree, EnvironmentVarGuard, reap_children)
@@ -265,6 +266,11 @@
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 = str(run_pydoc(missing_module), 'ascii')
More information about the Python-checkins
mailing list