Skip to content

Commit cd1a9a9

Browse files
Copilotshaypal5
andcommitted
Fix ruff-format pre-commit.ci failure in test_pickle_core.py
Co-authored-by: shaypal5 <917954+shaypal5@users.noreply.github.com>
1 parent 7157566 commit cd1a9a9

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

tests/pickle_tests/test_pickle_core.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)