12rambau / pytest-copie

The pytest plugin for your copier templates 📒
https://pytest-copie.readthedocs.io/en/latest/
MIT License
14 stars 2 forks source link

Ignore errors in teardown process #56

Closed GenevieveBuckley closed 8 months ago

GenevieveBuckley commented 8 months ago

Closes https://github.com/12rambau/pytest-copie/issues/55

I understand totally if you don't want to go with the simplest solution here, but I thought I'd open this in case your open to it.

With the current main branch, some users might run into failing CI jobs, like this.

With this PR, the worst case scenario is that some test files do not get removed completely from the pytest temp directories. That's not a problem on CI, since there is no persistance of files there. On a local machine, possibly this could become a problem if many hundreds or thousands of tiles built up over time on the disk (but presumably someone would clear the pytest cache at some stage if they needed more disk space). So, potentially annoying in some limited edge cases, but the advantage is that it won't cause the test suite to fail (and not because the tests fail, but because of an error in the teardown process).

codecov[bot] commented 8 months ago

Codecov Report

Merging #56 (04b1368) into main (c9f5e3f) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #56   +/-   ##
=======================================
  Coverage   98.59%   98.59%           
=======================================
  Files           2        2           
  Lines          71       71           
=======================================
  Hits           70       70           
  Misses          1        1           
Files Coverage Δ
pytest_copie/plugin.py 98.52% <100.00%> (ø)