Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the use of tmpdir and related #1759

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

WilliamJamieson
Copy link
Contributor

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:

  • pre-commit checks ran successfully
  • tests ran successfully
  • for a public change, a changelog entry was added
  • for a public change, documentation was updated
  • for any new features, unit tests were added

@WilliamJamieson WilliamJamieson requested a review from a team as a code owner February 20, 2024 20:33
@braingram
Copy link
Contributor

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?

Copy link
Contributor

@braingram braingram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update! Looks good to me.

@braingram braingram merged commit 841c046 into asdf-format:main Feb 20, 2024
34 checks passed
@WilliamJamieson WilliamJamieson deleted the remove_tmpdir branch February 28, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants