Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Pull Request
Description
Here is some more Iris functionality that I did not know existed, until @pp-mo mentioned it the other day. Described by the removed comment
iris/lib/iris/tests/__init__.py
Lines 940 to 946 in 6eb0401
I tried to run this with
unittest discoveras the comment recommends, but got errors, particularly from test_pandas.py. I found that this functionality can be used withpytest -s -v, so if we do want to keep the functionality we should probably document that. I'm unsure if it can be made to work withpytest-xdist.In any case, pytest provides its own functionality to tell you the timings of the slowest running tests via the
--durationsflag, and of course we now have somepytesttests which don't inherit fromIrisTest, so won't work with the bespoke functionality unless we go through and add the decorator.More generally, the more we can simplify these test classes, the better chance we have of eventually ditching
unittestaltogether.This functionality was added at #2372.
Consult Iris pull request check list