Spaces:
Running
Running
Merge pull request #502 from ZiadAmerr/fix-test-permission-error
Browse files
tests/resources/test_file_resources.py
CHANGED
|
@@ -99,7 +99,8 @@ class TestFileResource:
|
|
| 99 |
await resource.read()
|
| 100 |
|
| 101 |
@pytest.mark.skipif(
|
| 102 |
-
os.name == "nt",
|
|
|
|
| 103 |
)
|
| 104 |
async def test_permission_error(self, temp_file: Path):
|
| 105 |
"""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."""
|