style: use parebtgeses-less exceptions in side effects (tests only)

This commit is contained in:
2025-07-14 20:33:54 +03:00
parent f5aec4e5c1
commit 228c2cce51
35 changed files with 126 additions and 126 deletions

View File

@ -52,7 +52,7 @@ def test_repo_remove_fail_no_file(repo: Repo, mocker: MockerFixture) -> None:
must fail on missing file
"""
mocker.patch("pathlib.Path.glob", return_value=[Path("package.pkg.tar.xz")])
mocker.patch("pathlib.Path.unlink", side_effect=FileNotFoundError())
mocker.patch("pathlib.Path.unlink", side_effect=FileNotFoundError)
with pytest.raises(FileNotFoundError):
repo.remove("package", Path("package.pkg.tar.xz"))