Skip to content

Commit 3c8ca39

Browse files
committed
TEST: Generalize, schedule nibabel.checkwarns removal
1 parent 50df61d commit 3c8ca39

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
from importlib import import_module
12
from ..info import cmp_pkg_version
23
from ..testing import assert_raises
34

5+
SCHEDULE = [
6+
('3.0.0', ('nibabel.minc', 'nibabel.checkwarns')),
7+
]
48

5-
def test_minc_removed():
6-
if cmp_pkg_version('3.0.0dev') < 1:
7-
with assert_raises(ImportError):
8-
import nibabel.minc
9+
10+
def test_removals():
11+
for version, to_remove in SCHEDULE:
12+
if cmp_pkg_version(version) < 1:
13+
for module in to_remove:
14+
with assert_raises(ImportError, msg="Time to remove " + module):
15+
import_module(module)

0 commit comments

Comments
 (0)