Skip to content

Commit 68154f7

Browse files
author
Shoshana Berleant
committed
This reverts commit 24d0935 (didn't work in python 3)
1 parent 24d0935 commit 68154f7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nipype/testing/tests/test_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ def test_tempfatfs():
2020
with fatfs as tmpdir:
2121
yield assert_true, os.path.exists(tmpdir)
2222

23+
@patch('subprocess.check_call', MagicMock(
24+
side_effect=subprocess.CalledProcessError('','')))
2325
def test_tempfatfs_calledprocesserror():
24-
with patch('subprocess.check_call', MagicMock(side_effect=subprocess.CalledProcessError('',''))):
25-
yield assert_raises, IOError, TempFATFS
26+
yield assert_raises, IOError, TempFATFS
2627

28+
@patch('subprocess.Popen', MagicMock(side_effect=OSError()))
2729
def test_tempfatfs_oserror():
28-
with patch('subprocess.Popen', MagicMock()):
29-
subprocess.Popen.return_value.side_effect = OSError()
30-
yield assert_raises, IOError, TempFATFS
30+
yield assert_raises, IOError, TempFATFS

0 commit comments

Comments
 (0)