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 ('' ,'' )))
25
23
def test_tempfatfs_calledprocesserror ():
26
- yield assert_raises , IOError , TempFATFS
24
+ with patch ('subprocess.check_call' , MagicMock (side_effect = subprocess .CalledProcessError ('' ,'' ))):
25
+ yield assert_raises , IOError , TempFATFS
27
26
28
- @patch ('subprocess.Popen' , MagicMock (side_effect = OSError ()))
29
27
def test_tempfatfs_oserror ():
30
- yield assert_raises , IOError , TempFATFS
28
+ with patch ('subprocess.Popen' , MagicMock ()):
29
+ subprocess .Popen .return_value .side_effect = OSError ()
30
+ yield assert_raises , IOError , TempFATFS
You can’t perform that action at this time.
0 commit comments