few comments and docstring
@@ -68,6 +68,7 @@ def save_response_of_get(session, method, url, params=None, timeout=10, **kwargs
log.info(f'saving output to {filename} for url="{url}" and params="{params}"')
log.warning(
f"you may want to run `cp -fv {os.path.dirname(filename)}/* astroquery/heasarc/tests/data/; rm -rfv build`"
+ "you may also want to `git add astroquery/heasarc/tests/data/*`."
)
f.write(text)
@@ -76,6 +77,10 @@ def save_response_of_get(session, method, url, params=None, timeout=10, **kwargs
@pytest.fixture(autouse=True)
def patch_get(request):
+ """
+ If mode is not remote, patch `requests.Session` such that all `request`s will
+ return either a saved response or a locally defined get_mockreturn.
+ """
mode = request.param
mp = request.getfixturevalue("monkeypatch")
