Skip to content

Commit

Permalink
Fix pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinVanHeek committed Nov 8, 2024
1 parent 36d8d62 commit 2f7d57d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion news/11012.feature.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Network cache file permissions will inherit the permissions of the cache's directory with the exception of owner read/write permissions which will always be set. This feature enables sharing a cache in a multi-user environment.
Network cache file permissions will inherit the permissions of the cache's directory with the exception of owner read/write permissions which will always be set. This feature enables sharing a cache in a multi-user environment.
9 changes: 2 additions & 7 deletions tests/unit/test_network_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,12 @@ def test_cache_hashes_are_same(self, cache_tmpdir: Path) -> None:

@pytest.mark.skipif("sys.platform == 'win32'")
@pytest.mark.parametrize(
"perms, expected_perms",
[
(0o300, 0o700),
(0o700, 0o700),
(0o777, 0o777)
]
"perms, expected_perms", [(0o300, 0o700), (0o700, 0o700), (0o777, 0o777)]
)
def test_cache_inherits_perms(
self, cache_tmpdir: Path, perms: int, expected_perms: int
) -> None:
key="foo"
key = "foo"
with chmod(cache_tmpdir, perms):
cache = SafeFileCache(os.fspath(cache_tmpdir))
cache.set(key, b"bar")
Expand Down

0 comments on commit 2f7d57d

Please sign in to comment.