File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1245,9 +1245,10 @@ def flaky_remove(path):
12451245 raise PermissionError ("locked" )
12461246 real_remove (path )
12471247
1248- with patch ("cachier.cores.pickle.os.remove" , side_effect = flaky_remove ), patch (
1249- "cachier.cores.pickle.time.sleep"
1250- ) as mock_sleep :
1248+ with (
1249+ patch ("cachier.cores.pickle.os.remove" , side_effect = flaky_remove ),
1250+ patch ("cachier.cores.pickle.time.sleep" ) as mock_sleep ,
1251+ ):
12511252 core ._clear_all_cache_files ()
12521253 assert mock_sleep .call_count == 2
12531254 mock_sleep .assert_any_call (0.1 )
@@ -1278,9 +1279,11 @@ def mock_func():
12781279 with open (dummy_file , "wb" ) as f :
12791280 f .write (b"" )
12801281
1281- with patch ("cachier.cores.pickle.os.remove" , side_effect = PermissionError ("locked" )), patch (
1282- "cachier.cores.pickle.time.sleep"
1283- ), pytest .raises (PermissionError ):
1282+ with (
1283+ patch ("cachier.cores.pickle.os.remove" , side_effect = PermissionError ("locked" )),
1284+ patch ("cachier.cores.pickle.time.sleep" ),
1285+ pytest .raises (PermissionError ),
1286+ ):
12841287 core ._clear_all_cache_files ()
12851288
12861289
You can’t perform that action at this time.
0 commit comments