astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
706 stars 399 forks source link

BUG: use temporary directories for tests and cleanup after docs #3099

Closed bsipocz closed 1 month ago

bsipocz commented 1 month ago

I keep getting a mastDownload directory in my repo whenever I run mast tests/doctests. It should not be there, either all the tests should work with temporary directories or for the documentation we should either setup temporary directories transparent to the user reading the docs or cleanup afterwards.

cc @snbianco

snbianco commented 1 month ago

I don't get that directory when I run the doctests, but I do see it when I run test_mast_remote.py::test_observations_download_products. I'll make an MR to clean that up, but I want to make sure I'm not missing something from the doctests. The command I'm using is python -m pytest --remote-data=any docs/mast.

bsipocz commented 1 month ago

I do run the tests with pytest -P mast -R. TBH, I haven't dived into the details of whether the directory is created for the tests under astroquery/mast or for the doctests in docs/mast.

snbianco commented 1 month ago

Sorry, I read your first comment wrong! I did find the issue and made a fix at #3101