asdf-format / asdf

ASDF (Advanced Scientific Data Format) is a next generation interchange format for scientific data
http://asdf.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
511 stars 56 forks source link

Remove the use of tmpdir and related #1759

Closed WilliamJamieson closed 4 months ago

WilliamJamieson commented 4 months ago

Description

pytest recommends creating temporary directories with the tmp_path fixture instead of the legacy tmpdir. To check for use of the legacy method one can run with

pytest -p no:legacypath

This PR adds this to he addopts for pytest and then fixes all the issues. In particular the pytest_asdf pluggin blocks all downstream packages from running their tests with this option to detect the legacy temporary directory creations.

Checklist:

braingram commented 4 months ago

Thanks for making these improvements.

The compatibility tests are failing and will need to be updated if we want to use the no:legacypath option. Would you apply similar fixes to the tmpdir usage there?