Skip to content

MNT: tests should use temporary files and delete them #2107

@bsipocz

Description

@bsipocz

When using pytest directly, rather than the astropy test runner, quite a few tests are creating files that are not cleaned up after the run. The repo should be left clean of these once the tests are run. I have these after a full run with --remote-data.

	J6FL25S4Q.vot
	J6FL25S4Q.vot.fits.gz
	J6FL25S4Q.vot.jpg
	X0MC5101T.vot
	astroquery/xmatch/tests/data/http_result.csv
	doctests.py
	file.png
	filename.tar
	int_data/
	moc.fits
	tarfile_lightcurves.tar
	target.xml
	w0ji0v01t_c2f.fits.gz

edit: maybe add a command at the end of the remote-data tests that lists everything that got generated during the run? maybe even test that no new files are hanging around?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions