Skip to content

Commit bf0ce87

Browse files
authored
Remove Iris' TestRunner (#5205)
1 parent 73b4a3a commit bf0ce87

File tree

6 files changed

+13
-202
lines changed

6 files changed

+13
-202
lines changed

docs/src/whatsnew/latest.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ This document explains the changes made to Iris for this release
137137
#. `@lbdreyer`_ and `@trexfeathers`_ (reviewer) removed the ``--coding-tests``
138138
option from Iris' test runner. (:pull:`4765`)
139139

140+
#. `@lbdreyer`_ removed the Iris TestRunner. Tests are now run via nox or
141+
pytest. (:pull:`5205`)
142+
140143

141144
.. comment
142145
Whatsnew author names (@github name) in alphabetical order. Note that,

lib/iris/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ def get_dir_option(section, option, default=None):
171171
)
172172

173173
# Override the data repository if the appropriate environment variable
174-
# has been set. This is used in setup.py in the TestRunner command to
175-
# enable us to simulate the absence of external data.
174+
# has been set.
176175
override = os.environ.get("OVERRIDE_TEST_DATA_REPOSITORY")
177176
if override:
178177
TEST_DATA_DIR = None

lib/iris/tests/runner/__init__.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/iris/tests/runner/__main__.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

lib/iris/tests/runner/_runner.py

Lines changed: 0 additions & 143 deletions
This file was deleted.

noxfile.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ def tests(session: nox.sessions.Session):
188188
session.install("--no-deps", "--editable", ".")
189189
session.env.update(ENV)
190190
run_args = [
191-
"python",
192-
"-m",
193-
"iris.tests.runner",
194-
"--default-tests",
191+
"pytest",
192+
"-n",
193+
"auto",
194+
"lib/iris/tests",
195195
]
196196
if "-c" in session.posargs or "--coverage" in session.posargs:
197-
run_args.append("--coverage")
197+
run_args[-1:-1] = ["--cov=lib/iris", "--cov-report=xml"]
198198
session.run(*run_args)
199199

200200

@@ -241,10 +241,10 @@ def gallery(session: nox.sessions.Session):
241241
session.install("--no-deps", "--editable", ".")
242242
session.env.update(ENV)
243243
session.run(
244-
"python",
245-
"-m",
246-
"iris.tests.runner",
247-
"--gallery-tests",
244+
"pytest",
245+
"-n",
246+
"auto",
247+
"docs/gallery_tests",
248248
)
249249

250250

0 commit comments

Comments
 (0)