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():
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 ('' ,'' )))
2523def 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
2726
28- @patch ('subprocess.Popen' , MagicMock (side_effect = OSError ()))
2927def 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