Skip to content

Commit f1efc54

Browse files
committed
Update warning filters to account for moving tests
We are suppressing these with warning filters, of which the last part specifies only filter warnings that where raised in skimage. We now moved the tests into its own "tests" directory. Updating that last part to ":tests" to match the new location fixes things.
1 parent a4ef53a commit f1efc54

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ xfail_strict = true
188188
testpaths = ["tests"]
189189
filterwarnings = [
190190
"error",
191-
"ignore:.*use `imageio` or other I/O packages directly.*:FutureWarning:skimage",
191+
"ignore:.*use `imageio` or other I/O packages directly.*:FutureWarning:tests",
192192
"ignore:Implicit conversion of A to CSR:scipy.sparse.SparseEfficiencyWarning" # warn by pyamg in ruge_stuben_solver
193193
]
194194
norecursedirs = ["io/_plugins"]

tests/skimage/measure/test_regionprops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get_central_moment_function(img, spacing=(1, 1)):
101101

102102

103103
@pytest.mark.filterwarnings(
104-
"ignore:`RegionProperties.* is deprecated:FutureWarning:skimage"
104+
"ignore:`RegionProperties.* is deprecated:FutureWarning:tests"
105105
)
106106
def test_all_props():
107107
region = regionprops(SAMPLE, INTENSITY_SAMPLE)[0]
@@ -121,7 +121,7 @@ def test_all_props():
121121

122122

123123
@pytest.mark.filterwarnings(
124-
"ignore:`RegionProperties.* is deprecated:FutureWarning:skimage"
124+
"ignore:`RegionProperties.* is deprecated:FutureWarning:tests"
125125
)
126126
def test_all_props_3d():
127127
region = regionprops(SAMPLE_3D, INTENSITY_SAMPLE_3D)[0]
@@ -1494,7 +1494,7 @@ def test_extra_properties_table():
14941494

14951495

14961496
@pytest.mark.filterwarnings(
1497-
"ignore:`RegionProperties.* is deprecated:FutureWarning:skimage"
1497+
"ignore:`RegionProperties.* is deprecated:FutureWarning:tests"
14981498
)
14991499
def test_multichannel():
15001500
"""Test that computing multichannel properties works."""

tests/skimage/morphology/test_binary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ignore:"
1818
"`binary_(dilation|erosion|opening|closing)` is deprecated.*"
1919
"Use `skimage.morphology.(dilation|erosion|opening|closing)` instead"
20-
":FutureWarning:skimage"
20+
":FutureWarning:tests"
2121
)
2222

2323

@@ -166,7 +166,7 @@ def test_diamond_decomposition(function, radius, decomposition):
166166
@pytest.mark.parametrize("shape", [(3, 3, 3), (3, 4, 5)])
167167
@pytest.mark.parametrize("decomposition", ['separable', 'sequence'])
168168
@pytest.mark.filterwarnings(
169-
"ignore:.*falling back to decomposition='separable':UserWarning:skimage"
169+
"ignore:.*falling back to decomposition='separable':UserWarning:tests"
170170
)
171171
def test_cube_decomposition(function, shape, decomposition):
172172
"""Validate footprint decomposition for various shapes.

0 commit comments

Comments
 (0)