From b5162907977e9b223c5f31884b52ba728e40a2a5 Mon Sep 17 00:00:00 2001 From: roll Date: Wed, 25 Sep 2024 10:23:46 +0100 Subject: [PATCH] Skip permission tests on Windows --- dplib/helpers/__spec__/test_file.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dplib/helpers/__spec__/test_file.py b/dplib/helpers/__spec__/test_file.py index 6a1e945..8d714be 100644 --- a/dplib/helpers/__spec__/test_file.py +++ b/dplib/helpers/__spec__/test_file.py @@ -1,10 +1,14 @@ import os +import platform import stat from pathlib import Path +import pytest + from dplib.helpers.file import write_file +@pytest.mark.skipif(platform.system() == "Windows", reason="Unix only") def test_write_file_implicit_permissions_dp_002(tmpdir: Path): path = str(tmpdir / "test.txt") write_file(path, "Hello, World!") @@ -12,6 +16,7 @@ def test_write_file_implicit_permissions_dp_002(tmpdir: Path): assert permissions == "0o600" +@pytest.mark.skipif(platform.system() == "Windows", reason="Unix only") def test_write_file_explicit_permissions_dp_003(tmpdir: Path): path = str(tmpdir / "test.txt") write_file(path, "Hello, World!", permissions=0o644)