Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5e9464

Browse files
committed
Merged revisions 64095 via svnmerge from
svn+ssh://[email protected]/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/ ........
1 parent b4fb6e4 commit c5e9464

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_pydoc.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,12 @@ class PyDocDocTest(unittest.TestCase):
231231
def test_html_doc(self):
232232
result, doc_loc = get_pydoc_html(pydoc_mod)
233233
mod_file = inspect.getabsfile(pydoc_mod)
234-
expected_html = expected_html_pattern % (mod_file, mod_file, doc_loc)
234+
if sys.platform == 'win32':
235+
import nturl2path
236+
mod_url = nturl2path.pathname2url(mod_file)
237+
else:
238+
mod_url = mod_file
239+
expected_html = expected_html_pattern % (mod_url, mod_file, doc_loc)
235240
if result != expected_html:
236241
print_diffs(expected_html, result)
237242
self.fail("outputs are not equal, see diff above")

0 commit comments

Comments
 (0)