You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While troubleshooting coherent-oss/coherent.deps#1, I ran into an error where on Windows, coh test will fail to exit cleanly if the tests imported a binary module (a DLL):
PermissionError: [WinError 5] Access is denied:
'C:\\Users\\jaraco\\AppData\\Local\\Temp\\pip-run-pdh6qyq1\\bson\\_cbson.cp312-win_amd64.pyd'
Here's what's happening:
coherent.test uses pip-run to install the project and its test dependencies.
in the same process, coherent.test launches pytest with those dependencies on the path.
the tests run and in running those dependencies, a DLL is linked into the process, causing its file to be inaccessible (for write or delete).
even after pytest has torn down, the Python process still has a handle on that module, so it cannot be deleted.
This may be yet another reason to launch pytest in a subprocess instead of in the same process that needs to clean up the pip-run environment.
The text was updated successfully, but these errors were encountered:
While troubleshooting coherent-oss/coherent.deps#1, I ran into an error where on Windows,
coh test
will fail to exit cleanly if the tests imported a binary module (a DLL):Here's what's happening:
This may be yet another reason to launch
pytest
in a subprocess instead of in the same process that needs to clean up the pip-run environment.The text was updated successfully, but these errors were encountered: