@@ -186,37 +186,11 @@ def test_specs(self, uri):
186
186
bad_specs = []
187
187
for c in classes :
188
188
__import__ (uri )
189
- pkg_check = None
190
189
try :
191
190
with warnings .catch_warnings ():
192
191
warnings .simplefilter ("ignore" )
193
192
classinst = sys .modules [uri ].__dict__ [c ]
194
- pkg_name = uri .split ('.' )[2 ]
195
- have_pkg = 'have_%s' % pkg_name
196
- no_pkg = 'no_%s' % pkg_name
197
- base_uri = '.' .join (uri .split ('.' )[:3 ])
198
- if have_pkg in sys .modules [uri ].__dict__ :
199
- pkg_check = True
200
- pkg_check_uri = uri
201
- test_func = have_pkg
202
- test_name = '@skipif(%s==False)' % have_pkg
203
- if no_pkg in sys .modules [uri ].__dict__ :
204
- pkg_check = True
205
- pkg_check_uri = uri
206
- test_func = no_pkg
207
- test_name = '@skipif(%s)' % no_pkg
208
- if have_pkg in sys .modules [base_uri ].__dict__ :
209
- pkg_check = True
210
- pkg_check_uri = base_uri
211
- test_func = have_pkg
212
- test_name = '@skipif(%s==False)' % have_pkg
213
- if no_pkg in sys .modules [base_uri ].__dict__ :
214
- pkg_check = True
215
- pkg_check_uri = base_uri
216
- test_func = no_pkg
217
- test_name = '@skipif(%s)' % no_pkg
218
193
except Exception as inst :
219
- print inst
220
194
continue
221
195
222
196
if not issubclass (classinst , BaseInterface ):
@@ -235,11 +209,6 @@ def test_specs(self, uri):
235
209
'from nipype.testing import assert_equal' ,
236
210
'from %s import %s' % (uri , c ),
237
211
'' ]
238
- if pkg_check :
239
- cmd .append ('from nipype.testing import skipif' )
240
- cmd .append ('from %s import %s' % (pkg_check_uri ,
241
- test_func ))
242
- cmd .append (test_name )
243
212
cmd .append ('def test_%s_inputs():' % c )
244
213
input_fields = ''
245
214
for traitname , trait in sorted (classinst .input_spec ().traits (transient = None ).items ()):
0 commit comments