diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2014-07-10 16:18:00 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2014-07-10 16:18:00 (GMT) |
commit | eb43214427b1ae6d7095bdd2333e9bc2220f9449 (patch) | |
tree | 77bc2894579fc239b8d6f6e3f4fbfc358901b525 /Lib/test/test_pydoc.py | |
parent | 7cca28ffa2efff47d4c53080f49c5b5c8eebbc19 (diff) | |
download | cpython-eb43214427b1ae6d7095bdd2333e9bc2220f9449.zip cpython-eb43214427b1ae6d7095bdd2333e9bc2220f9449.tar.gz cpython-eb43214427b1ae6d7095bdd2333e9bc2220f9449.tar.bz2 |
Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r-- | Lib/test/test_pydoc.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 3bce66e..a513fa6 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -14,6 +14,7 @@ import test.support import time import types import unittest +import urllib.parse import xml.etree import textwrap from io import StringIO @@ -406,11 +407,7 @@ class PydocDocTest(unittest.TestCase): def test_html_doc(self): result, doc_loc = get_pydoc_html(pydoc_mod) mod_file = inspect.getabsfile(pydoc_mod) - if sys.platform == 'win32': - import nturl2path - mod_url = nturl2path.pathname2url(mod_file) - else: - mod_url = mod_file + mod_url = urllib.parse.quote(mod_file) expected_html = expected_html_pattern % ( (mod_url, mod_file, doc_loc) + expected_html_data_docstrings) |