Skip to content

Commit adeb865

Browse files
drammocklarsoner
andauthored
specify testpaths in pytest config (#13389)
Co-authored-by: Eric Larson <[email protected]>
1 parent 5268ba8 commit adeb865

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

mne/transforms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
_ensure_int,
2626
_import_nibabel,
2727
_path_like,
28+
_record_warnings,
2829
_require_version,
2930
_validate_type,
3031
check_fname,
@@ -1786,7 +1787,7 @@ def _compute_volume_registration(
17861787
):
17871788
nib = _import_nibabel("SDR morph")
17881789
_require_version("dipy", "SDR morph", "0.10.1")
1789-
with np.testing.suppress_warnings():
1790+
with _record_warnings():
17901791
from dipy.align import (
17911792
affine,
17921793
affine_registration,

pyproject.toml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,24 @@ module = ['mne.annotations', 'mne.epochs', 'mne.evoked', 'mne.io']
265265
# -r f (failed), E (error), s (skipped), x (xfail), X (xpassed), w (warnings)
266266
# don't put in xfail for pytest 8.0+ because then it prints the tracebacks,
267267
# which look like real errors
268-
addopts = """--durations=20 --doctest-modules -rfEXs --cov-report= --tb=short \
269-
--cov-branch --doctest-ignore-import-errors --junit-xml=junit-results.xml \
270-
--ignore=doc --ignore=logo --ignore=examples --ignore=tutorials \
271-
--ignore=mne/gui/_*.py --ignore=mne/icons --ignore=tools \
272-
--ignore=mne/report/js_and_css \
273-
--color=yes --capture=sys"""
268+
addopts = [
269+
"--capture=sys",
270+
"--color=yes",
271+
"--cov-branch",
272+
"--cov-report=",
273+
"--doctest-ignore-import-errors",
274+
"--doctest-modules",
275+
"--durations=20",
276+
"--ignore=mne/gui/_*.py",
277+
"--ignore=mne/icons",
278+
"--ignore=mne/report/js_and_css",
279+
"--junit-xml=junit-results.xml",
280+
"--tb=short",
281+
"-rfEXs",
282+
]
283+
testpaths = [
284+
"mne",
285+
]
274286

275287
[tool.rstcheck]
276288
ignore_directives = [

0 commit comments

Comments
 (0)