python
system_error
ai_generated
partial
PermissionError: [Errno 13] Permission denied: '/tmp/pytest-of-user/pytest-123/test_foo0'
ID: python/pytest-tmpdir-permission-error
80%Fix Rate
80%Confidence
0Evidence
2024-09-11First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 7.4.0 | active | — | — | — |
Root Cause
pytest 临时目录权限不足,或已被其他进程占用
generic中文
pytest 临时目录权限不足,或已被其他进程占用
Workarounds
-
85% success
pytest --basetemp=/home/user/mytmp
-
70% success
chmod -R 775 /tmp/pytest-of-user
Dead Ends
Common approaches that don't work:
-
50% fail
如果权限问题源于系统,删除可能失败或需要 root
-
40% fail
如果不了解配置方法,可能引入新问题