-
Notifications
You must be signed in to change notification settings - Fork 283
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 test timings #5101
Remove test timings #5101
Conversation
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.
Looking great! Thanks for doing this @rcomer !
I spotted one other mention of IrisTest_nometa here: https://github.com/SciTools/iris/blame/main/lib/iris/tests/graphics/README.md#L27
Do you mind also updating that in this PR?
05705ec
to
d3ad08c
Compare
Thanks @lbdreyer, good spot! I only grepped the python files. Now fixed and also rebased to address the whatsnew conflict. |
* upstream/main: (167 commits) pip pin for sphinx<5 (SciTools#5122) [pre-commit.ci] pre-commit autoupdate (SciTools#5120) Bump actions/stale from 6 to 7 (SciTools#5117) [pre-commit.ci] pre-commit autoupdate (SciTools#5114) Correct heading for v3.4 release highlights. (SciTools#5110) Announce @ESadek-MO as a core Iris developer. (SciTools#5111) Remove test timings (SciTools#5101) Switch order of options and parameter in `ncgen` command (SciTools#5105) [pre-commit.ci] pre-commit autoupdate (SciTools#5107) Updated environment lockfiles (SciTools#5104) DOC: improve gallery test instructions (SciTools#5100) Updated environment lockfiles (SciTools#5092) Update What's New for 3.4 release. (SciTools#5088) [pre-commit.ci] pre-commit autoupdate (SciTools#5086) Updated environment lockfiles (SciTools#5085) Updated environment lockfiles (SciTools#5080) Restore latest What's New files. Documentation updates for `v3.4.0rc0` release. (SciTools#5078) What's New fixes. (SciTools#5077) More accurate netcdf4 pin `<1.6.1`. (SciTools#5075) ...
🚀 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 discover
as 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
--durations
flag, and of course we now have somepytest
tests 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
unittest
altogether.This functionality was added at #2372.
Consult Iris pull request check list