[Python-checkins] r64095 - python/trunk/Lib/test/test_pydoc.py
amaury.forgeotdarc
python-checkins at python.org
Tue Jun 10 23:37:15 CEST 2008
Author: amaury.forgeotdarc
Date: Tue Jun 10 23:37:15 2008
New Revision: 64095
Log:
Correct test_pydoc for win32 platforms, to account for normalized URLs:
C:\temp => file:///C|temp/
Modified:
python/trunk/Lib/test/test_pydoc.py
Modified: python/trunk/Lib/test/test_pydoc.py
==============================================================================
--- python/trunk/Lib/test/test_pydoc.py (original)
+++ python/trunk/Lib/test/test_pydoc.py Tue Jun 10 23:37:15 2008
@@ -214,7 +214,12 @@
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")
More information about the Python-checkins
mailing list