summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-06-14 23:04:46 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-06-14 23:04:46 (GMT)
commitc5e94641bff2557a55be2a497bf974ff9c2a6e28 (patch)
tree5d2e884cd9560970435b9dedeef38e73759b6acc
parentb4fb6e4d27b56c2119bd1dad83afce874e34a72a (diff)
downloadcpython-c5e94641bff2557a55be2a497bf974ff9c2a6e28.zip
cpython-c5e94641bff2557a55be2a497bf974ff9c2a6e28.tar.gz
cpython-c5e94641bff2557a55be2a497bf974ff9c2a6e28.tar.bz2
Merged revisions 64095 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r64095 | amaury.forgeotdarc | 2008-06-10 16:37:15 -0500 (Tue, 10 Jun 2008) | 3 lines Correct test_pydoc for win32 platforms, to account for normalized URLs: C:\temp => file:///C|temp/ ........
-rw-r--r--Lib/test/test_pydoc.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index ab1b083..8b30e26 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -231,7 +231,12 @@ class PyDocDocTest(unittest.TestCase):
def test_html_doc(self):
result, doc_loc = get_pydoc_html(pydoc_mod)
mod_file = inspect.getabsfile(pydoc_mod)
- expected_html = expected_html_pattern % (mod_file, mod_file, doc_loc)
+ if sys.platform == 'win32':
+ import nturl2path
+ mod_url = nturl2path.pathname2url(mod_file)
+ else:
+ mod_url = mod_file
+ expected_html = expected_html_pattern % (mod_url, mod_file, doc_loc)
if result != expected_html:
print_diffs(expected_html, result)
self.fail("outputs are not equal, see diff above")