summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-06-10 21:37:15 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-06-10 21:37:15 (GMT)
commit8e8de4afefdfaacdbe58a11c492f9de32daec6a0 (patch)
tree566aaf9084d53abdca7731f2558b09864a5f28d2 /Lib/test
parentb7fea62ccaf10364047e8fc39005fafec7ad5975 (diff)
downloadcpython-8e8de4afefdfaacdbe58a11c492f9de32daec6a0.zip
cpython-8e8de4afefdfaacdbe58a11c492f9de32daec6a0.tar.gz
cpython-8e8de4afefdfaacdbe58a11c492f9de32daec6a0.tar.bz2
Correct test_pydoc for win32 platforms, to account for normalized URLs:
C:\temp => file:///C|temp/
Diffstat (limited to 'Lib/test')
-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 1fad063..c78e986 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -214,7 +214,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")