Skip to content

Add note about removing the iris.tests import #6603

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

Merged
merged 3 commits into from
Aug 5, 2025
Merged
Changes from all 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
4 changes: 4 additions & 0 deletions docs/src/developers_guide/contributing_pytest_conversions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Conversion Checklist
#. Check for references to ``self.tmp_dir``. In pytest, ``tmp_path`` is used instead,
and can be passed into functions as a fixture.
#. Check for ``if __name__ == 'main'``. This is no longer needed with pytest.
#. Replace any remaining references to :mod:`iris.tests` with references to
:mod:`iris.tests._shared_utils`. (E.g. :func:`iris.tests.get_data_path` to
:func:`iris.tests._shared_utils.get_data_path`).
#. Remove the top-level import of :mod:`iris.tests` (usually ``import iris.tests as tests``).
#. Check for ``mock.patch("warnings.warn")``. This can be replaced with
``pytest.warns(match=message)``.
#. Ensure that all test classes start with ``Test``. Tests will not run in pytest without it.
Expand Down
Loading