From 1393a2bb0625ea8df5196cc9678cff40a4bb3cad Mon Sep 17 00:00:00 2001 From: "Amerr, Ziad (ext) (DI SW ICS MNA RD QA QST 2)" Date: Mon, 19 May 2025 20:12:07 +0300 Subject: [PATCH] Reformatting, and adding copilot's suggestion --- tests/resources/test_file_resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/resources/test_file_resources.py b/tests/resources/test_file_resources.py index 4d2bc63cf..06f4576d5 100644 --- a/tests/resources/test_file_resources.py +++ b/tests/resources/test_file_resources.py @@ -99,8 +99,8 @@ class TestFileResource: await resource.read() @pytest.mark.skipif( - os.name == "nt" or os.getuid() == 0, - reason="File permissions behave differently on Windows or when running as root" + os.name == "nt" or (hasattr(os, 'getuid') and os.getuid() == 0), + reason="File permissions behave differently on Windows or when running as root", ) async def test_permission_error(self, temp_file: Path): """Test reading a file without permissions."""