We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb42292 commit 24d0935Copy full SHA for 24d0935
nipype/testing/tests/test_utils.py
@@ -20,11 +20,11 @@ def test_tempfatfs():
20
with fatfs as tmpdir:
21
yield assert_true, os.path.exists(tmpdir)
22
23
-@patch('subprocess.check_call', MagicMock(
24
- side_effect=subprocess.CalledProcessError('','')))
25
def test_tempfatfs_calledprocesserror():
26
- yield assert_raises, IOError, TempFATFS
+ with patch('subprocess.check_call', MagicMock(side_effect=subprocess.CalledProcessError('',''))):
+ yield assert_raises, IOError, TempFATFS
27
28
-@patch('subprocess.Popen', MagicMock(side_effect=OSError()))
29
def test_tempfatfs_oserror():
30
+ with patch('subprocess.Popen', MagicMock()):
+ subprocess.Popen.return_value.side_effect = OSError()
0 commit comments