From d6ea3f9a7835f47078585a680b60e9d85bb069c3 Mon Sep 17 00:00:00 2001 From: jeremy avnet Date: Tue, 13 Aug 2024 14:36:05 -0700 Subject: [PATCH] Don't test group/other perms on windows (not supported) --- tests/test_json_store.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_json_store.py b/tests/test_json_store.py index b58c5c4..03b1144 100644 --- a/tests/test_json_store.py +++ b/tests/test_json_store.py @@ -2,6 +2,7 @@ from __future__ import absolute_import, unicode_literals import os +import platform import shutil import stat from tempfile import NamedTemporaryFile @@ -154,10 +155,11 @@ def test_set_mode(): store = get_new_store(mode=int("640", 8)) try: st_mode = os.stat(store.path).st_mode + is_windows = platform.system() == "Windows" assert st_mode & stat.S_IRUSR assert st_mode & stat.S_IWUSR - assert st_mode & stat.S_IRGRP - assert not st_mode & stat.S_IWGRP - assert not st_mode & stat.S_IROTH + assert st_mode & stat.S_IRGRP or is_windows + assert not st_mode & stat.S_IWGRP or is_windows + assert not st_mode & stat.S_IROTH or is_windows finally: os.remove(store.path)