-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Our unit test suite is always failing when building for emscripten-wasm32, because getuid in emscripten always returns 0. This causes the following exception to always trip:
Lines 179 to 189 in 9ccae9a
if sys.platform != "win32": | |
uid = os.getuid() | |
rootdir_stat = rootdir.stat() | |
# getuid shouldn't fail, but cpython defines such a case. | |
# Let's hope for the best. | |
if uid != -1: | |
if rootdir_stat.st_uid != uid: | |
raise OSError( | |
f"The temporary directory {rootdir} is not owned by the current user. " | |
"Fix this and try again." | |
) |
The trivial fix is just to add and sys.platform != "emscripten"
to the if
check. Adding this makes our test suite pass.
I would have made a PR but I don't want to add my name to AUTHORS.
Encountered with Python 3.11.2+, pytest 7.2.1, and node.js v14.18.2.
Metadata
Metadata
Assignees
Labels
No labels