I've found that if there are any errors in the pytest-copie teardown process here, then pytest reports errors, failing the build. Would it be possible to either set shutil.rmtree(test_dir, ignore_errors=True), or have ignoring errors at this point be a user configuration option we can set somehow?
Additional details
The reason shutil.rmtree is producing errors for us is that there are some write protected files being generated. We don't really care if the teardown process leaves some files intact - for us it is much more important that the github CI runner shows us whether the tests pass or fail.
(We are ending up with write protected files because our template is running a task to run git init and git add + git commit on the newly created repository. Git is producing some write protected files (weirdly, this is only a problem for us on Windows) and I haven't been able to figure out if there's a way to modify the permissions. There seems like it should be possible to do, but the immutability of git commits is making things difficult)
Describe the bug Over at the napari-plugin-template repo we've been struggling to make our CI pass with pytest-copie.
I've found that if there are any errors in the pytest-copie teardown process here, then pytest reports errors, failing the build. Would it be possible to either set
shutil.rmtree(test_dir, ignore_errors=True)
, or have ignoring errors at this point be a user configuration option we can set somehow?Additional details The reason shutil.rmtree is producing errors for us is that there are some write protected files being generated. We don't really care if the teardown process leaves some files intact - for us it is much more important that the github CI runner shows us whether the tests pass or fail.
(We are ending up with write protected files because our template is running a task to run
git init
andgit add
+git commit
on the newly created repository. Git is producing some write protected files (weirdly, this is only a problem for us on Windows) and I haven't been able to figure out if there's a way to modify the permissions. There seems like it should be possible to do, but the immutability of git commits is making things difficult)To Reproduce
I have a minimal, reproducible example on the
tox-git-teardown-problem
branch of this repository: https://github.com/GenevieveBuckley/demo_template/tree/tox-git-teardown-problem