Amerr, Ziad (ext) (DI SW ICS MNA RD QA QST 2) commited on
Commit
e483e90
·
1 Parent(s): 24a616d

Reformatting, and adding copilot's suggestion

Browse files
tests/resources/test_file_resources.py CHANGED
@@ -99,8 +99,8 @@ class TestFileResource:
99
  await resource.read()
100
 
101
  @pytest.mark.skipif(
102
- os.name == "nt" or os.getuid() == 0,
103
- reason="File permissions behave differently on Windows or when running as root"
104
  )
105
  async def test_permission_error(self, temp_file: Path):
106
  """Test reading a file without permissions."""
 
99
  await resource.read()
100
 
101
  @pytest.mark.skipif(
102
+ os.name == "nt" or (hasattr(os, 'getuid') and os.getuid() == 0),
103
+ reason="File permissions behave differently on Windows or when running as root",
104
  )
105
  async def test_permission_error(self, temp_file: Path):
106
  """Test reading a file without permissions."""