summaryrefslogtreecommitdiff
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorKirill <iam@python273.pw>2019-11-13 19:13:53 +0300
committerTal Einat <taleinat+github@gmail.com>2019-11-13 18:13:52 +0200
commit61289d436661025a3111065482275d49a4850b8d (patch)
treec8930cd95057d24c8c779c0922e4dee3746bbf96 /Lib/test/test_pydoc.py
parentd89cea15ad37e873003fc74ec2c77660ab620b00 (diff)
downloadcpython-git-61289d436661025a3111065482275d49a4850b8d.tar.gz
bpo-38786: Add parsing of https links to pydoc (GH-17143)
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index c80477c50f..b803b8bff2 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -1311,6 +1311,17 @@ foo
'async <a name="-an_async_generator"><strong>an_async_generator',
html)
+ def test_html_for_https_links(self):
+ def a_fn_with_https_link():
+ """a link https://localhost/"""
+ pass
+
+ html = pydoc.HTMLDoc().document(a_fn_with_https_link)
+ self.assertIn(
+ '<a href="https://localhost/">https://localhost/</a>',
+ html
+ )
+
class PydocServerTest(unittest.TestCase):
"""Tests for pydoc._start_server"""