File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
nipype/interfaces/base/tests Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 3
3
# vi: set ft=python sts=4 ts=4 sw=4 et:
4
4
import os
5
5
import simplejson as json
6
+ import logging
6
7
7
8
import pytest
8
9
from unittest import mock
@@ -236,6 +237,21 @@ class DerivedInterface1(nib.BaseInterface):
236
237
obj ._check_version_requirements (obj .inputs )
237
238
238
239
240
+ def test_input_version_missing (caplog ):
241
+ class DerivedInterface (nib .BaseInterface ):
242
+ class input_spec (nib .TraitedSpec ):
243
+ foo = nib .traits .Int (min_ver = "0.9" )
244
+ bar = nib .traits .Int (max_ver = "0.9" )
245
+ _version = "misparsed-garbage"
246
+
247
+ obj = DerivedInterface ()
248
+ obj .inputs .foo = 1
249
+ obj .inputs .bar = 1
250
+ with caplog .at_level (logging .WARNING , logger = "nipype.interface" ):
251
+ obj ._check_version_requirements (obj .inputs )
252
+ assert len (caplog .records ) == 2
253
+
254
+
239
255
def test_output_version ():
240
256
class InputSpec (nib .TraitedSpec ):
241
257
foo = nib .traits .Int (desc = "a random int" )
You can’t perform that action at this time.
0 commit comments