-
-
Notifications
You must be signed in to change notification settings - Fork 10
Retirement roadmap for pytest-openfiles #44
Conversation
I added this to the proposed agenda for infrastructure tag-up. |
Could you add details about what to use instead? |
I added https://docs.astropy.org/en/latest/development/testguide.html#testing-for-open-files to the roadmap doc here. |
README.rst
Outdated
See https://docs.astropy.org/en/latest/development/testguide.html#testing-for-open-files | ||
on how to test for open files without this package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to have an example here in this repo that is concrete. I.e.:
For open file testing, use Python's built in warning-to-error handling switch -W
. Pytest invocations support this as well. To capture all open file ResourceWarnings:
pytest -W error::ResourceWarning
or set it up in your setup.cfg:
[tool:pytest]
filterwarnings =
error::ResourceWarning
For more detail on -W
, see https://docs.python.org/3/using/cmdline.html#cmdoption-W
Or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK done. Thanks for the suggestion!
Co-authored-by: James Davies <jdavies@stsci.edu>
This needs to be removed from the install list of pytest-astropy, too |
@bsipocz , good point! When would be a good time to do that? I have opened astropy/pytest-astropy#51 |
I think the order of things should be: 1a) remove usage. It's already done for core, but maybe do the good old batch-issue for affiliated packages (or at least for the subset of them that use |
Re: batch issue -- Great idea! Though maybe want to wait until this is merged first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to go!
This roadmap goes with
Also see
cc @jdavies-st