File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ def test_tempfatfs():
20
20
with fatfs as tmpdir :
21
21
yield assert_true , os .path .exists (tmpdir )
22
22
23
+ @patch ('subprocess.check_call' , MagicMock (
24
+ side_effect = subprocess .CalledProcessError ('' ,'' )))
23
25
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
26
27
28
+ @patch ('subprocess.Popen' , MagicMock (side_effect = OSError ()))
27
29
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
You can’t perform that action at this time.
0 commit comments