-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing on Windows: TemporaryDirectory can't be cleaned #59
Comments
Yes, locally I also get a permission error. |
col.notes.add_tag seems to be the culprit. I only focused on one of the tests. Might be that the dataframe manipulation causes somekind of os.cwd to be in the directory which could result in this error. And tempfile causing permissions errors under windows does also seem to be quite the common report. |
Btw since you are already using pytest. Any reason to not use the tmp_path provided by pytest? |
Yeah, back then I was still mostly using the |
Ah, I don't think so, because that also happens if you simply read and write the same collection. I think this really is a more fundamental issue about reading and writing files (and perhaps not closing them at some point?) |
Switching to pytest solved things! Not sure if it was a change on the way, or just your recommendation of |
pytest provides tmpdir and tmp_path. def test_tmp(tmp_path):
(tmp_path/ "sub").mkdir() works and you would save the casting. |
oh, nice :) Thanks! |
though I saw some issues with that in py3.5 that still require usage of But probably we can/should drop py3.5 support at some point soon anyway |
If you run
pytest
locally on Windows, there are weird PermissionErrors: Some other process seems to be still running that is using a file from the TemporaryDirectory, hence it can't be removed.@exc4l do you see this issue when running locally under Windows as well?
The text was updated successfully, but these errors were encountered: