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 33# vi: set ft=python sts=4 ts=4 sw=4 et:
44import os
55import simplejson as json
6+ import logging
67
78import pytest
89from unittest import mock
@@ -236,6 +237,21 @@ class DerivedInterface1(nib.BaseInterface):
236237 obj ._check_version_requirements (obj .inputs )
237238
238239
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+
239255def test_output_version ():
240256 class InputSpec (nib .TraitedSpec ):
241257 foo = nib .traits .Int (desc = "a random int" )
You can’t perform that action at this time.
0 commit comments