When running tests in capsul v3, I see one failing: capsul.process.test.test_nipype_wrap
run via:
python -m capsul.test -k test_nipype_wrap
Compared to the tests running on github, the difference is that I have SPM standalone installed and detected in the test.
The error is the following:
________________________________________ TestNipypeWrap.test_nipype_spm_exec _________________________________________
self = <capsul.process.test.test_nipype_wrap.TestNipypeWrap testMethod=test_nipype_spm_exec>
@unittest.skipIf(not init_spm_config(),
'SPM is not configured to run this test')
def test_nipype_spm_exec(self):
# we must do this again because when multiple tests are run, the init
# function may be called at the wrong time (too early, at import), then
# other tests will run and define a different Capsul object
init_spm_config()
c = Capsul()
template_dirs = ['spm12_mcr/spm12/spm12',
'spm12_mcr/spm12',
'spm12']
for template_dir_s in template_dirs:
template_dir = osp.join(
> c.config.builtin.spm.spm12_standalone.directory, template_dir_s)
process/test/test_nipype_wrap.py:136:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = EngineConfiguration(dataset=undefined, config_modules=undefined, python_modules=undefined, database='builtin', start_workers={'type': 'builtin', 'count': 2})
name = 'spm'
def __getattr__(self, name):
if name != '_dyn_fields':
dyn_fields = getattr(self, '_dyn_fields', None)
if dyn_fields:
field = dyn_fields.get(name)
if field:
result = getattr(field, name)
return result
> raise AttributeError('{} object has no attribute {}'.format(repr(self.__class__), repr(name)))
E AttributeError: <class 'capsul.config.configuration.EngineConfiguration'> object has no attribute 'spm'
/casa/host/build/python/soma/controller/controller.py:454: AttributeError
Getting more closely into it, it seems to be a config issue: in init_spm_config(), things are done this way (I simplify to get a minimal example):
The ConfigurationLayer object is now empty, the config options didn't get into it.
If I replace the = operation with:
config.user.import_dict(user_conf_dict)
then the configuration is properly set, and the test goes further. It fails later but this is a different issue.
Thus the = operation in ApplicationConfiguration doesn't work as expected (the doc shows a pretty similar example), and I think it used to work some time ago. The problem is probably in Controller however.
When running tests in capsul v3, I see one failing:
capsul.process.test.test_nipype_wrap
run via:Compared to the tests running on github, the difference is that I have SPM standalone installed and detected in the test. The error is the following:
Getting more closely into it, it seems to be a config issue: in
init_spm_config()
, things are done this way (I simplify to get a minimal example):output:
output:
The ConfigurationLayer object is now empty, the config options didn't get into it. If I replace the
=
operation with:then the configuration is properly set, and the test goes further. It fails later but this is a different issue. Thus the
=
operation inApplicationConfiguration
doesn't work as expected (the doc shows a pretty similar example), and I think it used to work some time ago. The problem is probably inController
however.