Skip to content

Commit b7b8889

Browse files
committed
tst: removed test skipping code - can be overwritten easily by adding a named test
1 parent c6facea commit b7b8889

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

tools/checkspecs.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -186,37 +186,11 @@ def test_specs(self, uri):
186186
bad_specs = []
187187
for c in classes:
188188
__import__(uri)
189-
pkg_check = None
190189
try:
191190
with warnings.catch_warnings():
192191
warnings.simplefilter("ignore")
193192
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
218193
except Exception as inst:
219-
print inst
220194
continue
221195

222196
if not issubclass(classinst, BaseInterface):
@@ -235,11 +209,6 @@ def test_specs(self, uri):
235209
'from nipype.testing import assert_equal',
236210
'from %s import %s' % (uri, c),
237211
'']
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)
243212
cmd.append('def test_%s_inputs():' % c)
244213
input_fields = ''
245214
for traitname, trait in sorted(classinst.input_spec().traits(transient=None).items()):

0 commit comments

Comments
 (0)