simplemonitor icon indicating copy to clipboard operation
simplemonitor copied to clipboard

Unit tests: clean up `did_recovery` and `did_recovered`

Open cpina opened this issue 11 months ago • 0 comments

After running the unit tests there are two files that are left behind: did_recovery and did_recovered. I think that they are created in the directory from where the unit test is invoked. Probably creating a temporary directory and deleting it after the specific unit test is a good idea.

Why am I reporting it?

  • To simplify Debian packaging packaging: https://salsa.debian.org/python-team/packages/simplemonitor/-/blob/debian/unstable/debian/rules?ref_type=heads#L6
  • If simplemonitor gets packaged in some other distribution/operating system: it might make packaging easier
  • I haven't verified this but potentially it could cause a false positive: if a test creates the file, the code gets broken but the file in some environment is still there: perhaps a test passes but the code is broken

cpina avatar Mar 04 '24 22:03 cpina