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 use of pytest-openfiles #90

Merged

Conversation

WilliamJamieson
Copy link
Collaborator

pytest-openfiles has been deprecated and is interfering with the use of fixtures in our test code (ones that handle files). This PR switches ResourceWarnings into errors which will catch almost all cases of files left open. The only cases it does not catch is if an open file handle is assigned to a global variable as the "warning" will not be emitted until python stops running, which occurs after pytest has completed.

Similar to spacetelescope/romancal#666

@WilliamJamieson WilliamJamieson requested a review from a team as a code owner April 7, 2023 14:44
@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (4eeb7aa) 54.17% compared to head (2a05ea0) 54.17%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #90   +/-   ##
=======================================
  Coverage   54.17%   54.17%           
=======================================
  Files          25       25           
  Lines        3057     3057           
=======================================
  Hits         1656     1656           
  Misses       1401     1401           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@WilliamJamieson WilliamJamieson merged commit e5aca99 into spacetelescope:master Apr 9, 2023
@WilliamJamieson WilliamJamieson deleted the bugfix/pytest-openfiles branch April 10, 2023 13:58
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