Closed dmartindeblas closed 2 days ago
When launching the tests as explained here using the master branch of a just-forked nipype repository the test "nipype/interfaces/tests/test_matlab.py::test_run_interface" fails. The reason seems to be that the raised exception is a RuntimeError instead of the expected OSError: https://github.com/nipy/nipype/blob/cd4c34d935a43812d1756482fdc4034844e485b8/nipype/interfaces/tests/test_matlab.py#L104-L107
Test "nipype/interfaces/tests/test_matlab.py::test_run_interface" fails since it raises a RuntimeError
Test "nipype/interfaces/tests/test_matlab.py::test_run_interface" passes.
Running the tests as explained here using the master branch (commit: cd4c34d)
Specifications:
MATLABCMD enviroment variable was exported to the correct matlab executable
{'commit_hash': 'cd4c34d93', 'commit_source': 'repository', 'networkx_version': '2.6.3', 'nibabel_version': '3.2.2', 'nipype_version': '1.7.1-dev+gcd4c34d93', 'numpy_version': '1.22.2', 'pkg_path': '<repositories_path>/nipype_fork/nipype', 'scipy_version': '1.8.0', 'sys_executable': '<anaconda3_path>/envs/nipypedev/bin/python', 'sys_platform': 'linux', 'sys_version': '3.9.10 | packaged by conda-forge | (main, Feb 1 2022, ' '21:24:11) \n' '[GCC 9.4.0]', 'traits_version': '6.3.2'}
I have replaced the line the OSError exception in line https://github.com/nipy/nipype/blob/cd4c34d935a43812d1756482fdc4034844e485b8/nipype/interfaces/tests/test_matlab.py#L106 with the RuntimeError exception and the tests is passing with my setup, but I ignore if this change will not work for other setups. Let me know if you want that I make a Pull Request.
Yes, that looks correct. It seems that we don't have any CI builds that install the MATLAB runtime. Please feel free to submit a PR.
Summary
When launching the tests as explained here using the master branch of a just-forked nipype repository the test "nipype/interfaces/tests/test_matlab.py::test_run_interface" fails. The reason seems to be that the raised exception is a RuntimeError instead of the expected OSError: https://github.com/nipy/nipype/blob/cd4c34d935a43812d1756482fdc4034844e485b8/nipype/interfaces/tests/test_matlab.py#L104-L107
Actual behavior
Test "nipype/interfaces/tests/test_matlab.py::test_run_interface" fails since it raises a RuntimeError
Expected behavior
Test "nipype/interfaces/tests/test_matlab.py::test_run_interface" passes.
How to replicate the behavior
Running the tests as explained here using the master branch (commit: cd4c34d)
Specifications:
MATLABCMD enviroment variable was exported to the correct matlab executable
Platform details:
Execution environment
Possible solution
I have replaced the line the OSError exception in line https://github.com/nipy/nipype/blob/cd4c34d935a43812d1756482fdc4034844e485b8/nipype/interfaces/tests/test_matlab.py#L106 with the RuntimeError exception and the tests is passing with my setup, but I ignore if this change will not work for other setups. Let me know if you want that I make a Pull Request.