Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ core `astropy`_ project since it is of use more generally.
.. _pytest: https://pytest.org/en/latest/
.. _astropy: https://astropy.org/en/latest/

IMPORTANT: Retirement Roadmap
-----------------------------

As of https://github.com/astropy/astropy/pull/14041 , this package is no
longer used in ``astropy`` core library. We strongly advise any packages
that still use this package to migrate away from it. When ``astropy`` 6.0
is released (tentatively Nov 2023), none of the active development branches
of the core library would use this package anymore.

After that, we will just do one last release of ``pytest-openfiles``
and archive this repository.

See https://docs.astropy.org/en/latest/development/testguide.html#testing-for-open-files
on how to test for open files without this package.
Copy link
Copy Markdown
Contributor

@jdavies-st jdavies-st Jan 26, 2023

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.

Copy link
Copy Markdown
Member Author

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!


Motivation
----------

Expand Down