From ea38855cd396a36ac00abcda11687ef7f968fa81 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 16 Jan 2023 11:18:57 -0600 Subject: [PATCH] Fix Windows tests, which fail only due to <100% coverage (#123) --- tests/test_cli.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index cfb61e9..210fa20 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -47,10 +47,13 @@ def test_cli_tox_ini_not_file(tmp_path, capsys): ("flag", "error"), [ (S_IREAD, "write"), - (S_IWRITE, "read"), + pytest.param( + S_IWRITE, + "read", + marks=pytest.mark.skipif(sys.platform == "win32", reason="On Windows, files cannot be write-only"), + ), ], ) -@pytest.mark.skipif(sys.platform == "win32", reason="On Windows files cannot be read only, only folders") def test_cli_tox_ini_permission_fail(tmp_path, capsys, flag, error): path = tmp_path / "tox.ini" path.write_text("")