class documentation

class TestIntersphinxCache:

View In Hierarchy

Tests for sphinx.IntersphinxCache
Method send​_returns Return a function that patches requests.adapters.HTTPAdapter.send so that it returns the provided requests.Response.
Method test​_cache IntersphinxCache.get caches responses to the file system.
Method test_get​Raises​Exception IntersphinxCache.get returns None if an exception is raised while GETing a URL and logs the exception.
@pytest.fixture
def send_returns(self, monkeypatch):
Return a function that patches requests.adapters.HTTPAdapter.send so that it returns the provided requests.Response.
Parameters
monkeypatch:MonkeyPatchUndocumented
Returns
Callable[[HTTPResponse], MonkeyPatch]Undocumented
def test_cache(self, tmp_path, send_returns):
IntersphinxCache.get caches responses to the file system.
Parameters
tmp​_path:PathUndocumented
send​_returns:Callable[[HTTPResponse], None]Undocumented
def test_getRaisesException(self, caplog):
IntersphinxCache.get returns None if an exception is raised while GETing a URL and logs the exception.
Parameters
caplog:CapLogUndocumented