From 8e4065cfc743f8f01087f2a212ecf5f6c20bd711 Mon Sep 17 00:00:00 2001 From: Mariko Wakabayashi Date: Wed, 18 Nov 2020 18:45:58 -0700 Subject: [PATCH] Skip test for windows --- tests/services/contents/test_manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/services/contents/test_manager.py b/tests/services/contents/test_manager.py index 5bedb79779..27534dd8fc 100644 --- a/tests/services/contents/test_manager.py +++ b/tests/services/contents/test_manager.py @@ -192,12 +192,14 @@ async def test_good_symlink(file_contents_manager_class, tmp_path): assert sorted(dir_model['content'], key=lambda x: x['name']) == [symlink_model, file_model] +@pytest.mark.skipif( + sys.platform.startswith('win'), + reason="Can't test permissions on Windows" +) async def test_403(file_contents_manager_class, tmp_path): if hasattr(os, 'getuid'): if os.getuid() == 0: raise pytest.skip("Can't test permissions as root") - if sys.platform.startswith('win'): - raise pytest.skip("Can't test permissions on Windows") td = str(tmp_path) cm = file_contents_manager_class(root_dir=td)