From 9b2c1c679a9e362b05ae07e5228d564d8889422b Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 5 Jun 2019 23:42:24 +0900 Subject: [PATCH] Fix #6444: test: replace example.com by existing page --- tests/roots/test-images/index.rst | 2 +- tests/roots/test-intl/external_links.txt | 4 ++-- tests/roots/test-linkcheck/links.txt | 10 +++++----- tests/test_build_html.py | 10 +++++----- tests/test_build_latex.py | 2 +- tests/test_build_linkcheck.py | 8 ++++---- tests/test_intl.py | 4 ++-- tests/test_markup.py | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/roots/test-images/index.rst b/tests/roots/test-images/index.rst index 67b742b27..14a2987a0 100644 --- a/tests/roots/test-images/index.rst +++ b/tests/roots/test-images/index.rst @@ -26,4 +26,4 @@ test-image .. image:: https://www.python.org/static/img/python-logo.png .. non-exist remote image -.. image:: http://example.com/NOT_EXIST.PNG +.. image:: https://www.google.com/NOT_EXIST.PNG diff --git a/tests/roots/test-intl/external_links.txt b/tests/roots/test-intl/external_links.txt index 96e3973de..1cecbeeb8 100644 --- a/tests/roots/test-intl/external_links.txt +++ b/tests/roots/test-intl/external_links.txt @@ -23,8 +23,8 @@ link to external1_ and external2_. link to `Sphinx Site `_ and `Python Site `_. -.. _external1: http://example.com/external1 -.. _external2: http://example.com/external2 +.. _external1: https://www.google.com/external1 +.. _external2: https://www.google.com/external2 Multiple references in the same line diff --git a/tests/roots/test-linkcheck/links.txt b/tests/roots/test-linkcheck/links.txt index ac5ed3246..fa8f11e4c 100644 --- a/tests/roots/test-linkcheck/links.txt +++ b/tests/roots/test-linkcheck/links.txt @@ -6,11 +6,11 @@ This is from CPython documentation. Some additional anchors to exercise ignore code -* `Example Bar invalid `_ -* `Example Bar invalid `_ tests that default ignore anchor of #! does not need to be prefixed with / -* `Example Bar invalid `_ +* `Example Bar invalid `_ +* `Example Bar invalid `_ tests that default ignore anchor of #! does not need to be prefixed with / +* `Example Bar invalid `_ * `Example anchor invalid `_ * `Complete nonsense `_ -.. image:: http://example.com/image.png -.. figure:: http://example.com/image2.png +.. image:: https://www.google.com/image.png +.. figure:: https://www.google.com/image2.png diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 677ca9de0..c66acbc75 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -1239,25 +1239,25 @@ def test_html_entity(app): def test_html_inventory(app): app.builder.build_all() with open(app.outdir / 'objects.inv', 'rb') as f: - invdata = InventoryFile.load(f, 'http://example.com', os.path.join) + invdata = InventoryFile.load(f, 'https://www.google.com', os.path.join) assert set(invdata.keys()) == {'std:label', 'std:doc'} assert set(invdata['std:label'].keys()) == {'modindex', 'genindex', 'search'} assert invdata['std:label']['modindex'] == ('Python', '', - 'http://example.com/py-modindex.html', + 'https://www.google.com/py-modindex.html', 'Module Index') assert invdata['std:label']['genindex'] == ('Python', '', - 'http://example.com/genindex.html', + 'https://www.google.com/genindex.html', 'Index') assert invdata['std:label']['search'] == ('Python', '', - 'http://example.com/search.html', + 'https://www.google.com/search.html', 'Search Page') assert set(invdata['std:doc'].keys()) == {'index'} assert invdata['std:doc']['index'] == ('Python', '', - 'http://example.com/index.html', + 'https://www.google.com/index.html', 'The basic Sphinx documentation for testing') diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 13bb22e96..56dfa7ca4 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -1242,7 +1242,7 @@ def test_latex_images(app, status, warning): # not found images assert '\\sphinxincludegraphics{{NOT_EXIST}.PNG}' not in result assert ('WARNING: Could not fetch remote image: ' - 'http://example.com/NOT_EXIST.PNG [404]' in warning.getvalue()) + 'https://www.google.com/NOT_EXIST.PNG [404]' in warning.getvalue()) # an image having target assert ('\\sphinxhref{https://www.sphinx-doc.org/}' diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py index 6d25058eb..4bf47a962 100644 --- a/tests/test_build_linkcheck.py +++ b/tests/test_build_linkcheck.py @@ -25,8 +25,8 @@ def test_defaults(app, status, warning): # looking for non-existent URL should fail assert " Max retries exceeded with url: /doesnotexist" in content # images should fail - assert "Not Found for url: http://example.com/image.png" in content - assert "Not Found for url: http://example.com/image2.png" in content + assert "Not Found for url: https://www.google.com/image.png" in content + assert "Not Found for url: https://www.google.com/image2.png" in content assert len(content.splitlines()) == 5 @@ -36,8 +36,8 @@ def test_defaults(app, status, warning): 'linkcheck_ignore': [ 'https://localhost:7777/doesnotexist', 'http://www.sphinx-doc.org/en/1.7/intro.html#', - 'http://example.com/image.png', - 'http://example.com/image2.png'] + 'https://www.google.com/image.png', + 'https://www.google.com/image2.png'] }) def test_anchors_ignored(app, status, warning): app.builder.build_all() diff --git a/tests/test_intl.py b/tests/test_intl.py index a052266b8..9790f50a3 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -885,8 +885,8 @@ def test_xml_keep_external_links(app): assert_elem( para1[0], ['LINK TO', 'external2', 'AND', 'external1', '.'], - ['http://example.com/external2', - 'http://example.com/external1']) + ['https://www.google.com/external2', + 'https://www.google.com/external1']) assert_elem( para1[1], ['LINK TO', 'THE PYTHON SITE', 'AND', 'THE SPHINX SITE', '.'], diff --git a/tests/test_markup.py b/tests/test_markup.py index 006d19caa..b8c9b66d9 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -279,9 +279,9 @@ def get_verifier(verify, verify_re): ( # in URIs 'verify_re', - '`test `_', + '`test `_', None, - r'\\sphinxhref{http://example.com/~me/}{test}.*', + r'\\sphinxhref{https://www.google.com/~me/}{test}.*', ), ( # description list: simple