summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorKirill <iam@python273.pw>2019-11-13 16:13:53 (GMT)
committerTal Einat <taleinat+github@gmail.com>2019-11-13 16:13:52 (GMT)
commit61289d436661025a3111065482275d49a4850b8d (patch)
treec8930cd95057d24c8c779c0922e4dee3746bbf96 /Lib/test/test_pydoc.py
parentd89cea15ad37e873003fc74ec2c77660ab620b00 (diff)
downloadcpython-61289d436661025a3111065482275d49a4850b8d.zip
cpython-61289d436661025a3111065482275d49a4850b8d.tar.gz
cpython-61289d436661025a3111065482275d49a4850b8d.tar.bz2
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 c80477c..b803b8b 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"""