summaryrefslogtreecommitdiff
path: root/tests/test_build_linkcheck.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-12 02:50:43 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-12 02:50:43 +0900
commit279e547860ea68e3c357f55e608afec682a1f961 (patch)
treedc08e85ab0210538e30b5b801bf9d80ab49bfb3f /tests/test_build_linkcheck.py
parent859b5fcea71f8d4f46e0ef3726e68df54bfbc3b7 (diff)
parent64fb1e56242d93ee0e8c317ab9e7643242b99658 (diff)
downloadsphinx-git-279e547860ea68e3c357f55e608afec682a1f961.tar.gz
Merge branch '3.x'
Diffstat (limited to 'tests/test_build_linkcheck.py')
-rw-r--r--tests/test_build_linkcheck.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py
index 908319e6b..88cf2aee1 100644
--- a/tests/test_build_linkcheck.py
+++ b/tests/test_build_linkcheck.py
@@ -12,13 +12,14 @@ import http.server
import json
import re
from unittest import mock
+
import pytest
from utils import http_server
@pytest.mark.sphinx('linkcheck', testroot='linkcheck', freshenv=True)
-def test_defaults(app, status, warning):
+def test_defaults(app):
app.builder.build_all()
assert (app.outdir / 'output.txt').exists()
@@ -39,7 +40,7 @@ def test_defaults(app, status, warning):
@pytest.mark.sphinx('linkcheck', testroot='linkcheck', freshenv=True)
-def test_defaults_json(app, status, warning):
+def test_defaults_json(app):
app.builder.build_all()
assert (app.outdir / 'output.json').exists()
@@ -100,7 +101,7 @@ def test_defaults_json(app, status, warning):
'https://www.google.com/image2.png',
'path/to/notfound']
})
-def test_anchors_ignored(app, status, warning):
+def test_anchors_ignored(app):
app.builder.build_all()
assert (app.outdir / 'output.txt').exists()
@@ -110,7 +111,7 @@ def test_anchors_ignored(app, status, warning):
assert not content
@pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)
-def test_raises_for_invalid_status(app, status, warning):
+def test_raises_for_invalid_status(app):
class InternalServerErrorHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
self.send_error(500, "Internal Server Error")
@@ -132,7 +133,7 @@ def test_raises_for_invalid_status(app, status, warning):
(r'.+google\.com.+', 'authinfo2'),
]
})
-def test_auth(app, status, warning):
+def test_auth(app):
mock_req = mock.MagicMock()
mock_req.return_value = 'fake-response'
@@ -160,7 +161,7 @@ def test_auth(app, status, warning):
"X-Secret": "open sesami",
}
}})
-def test_linkcheck_request_headers(app, status, warning):
+def test_linkcheck_request_headers(app):
mock_req = mock.MagicMock()
mock_req.return_value = 'fake-response'