Skip to content
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

Unit tests: clean up did_recovery and did_recovered #1356

Open
cpina opened this issue Mar 4, 2024 · 1 comment · May be fixed by #1599
Open

Unit tests: clean up did_recovery and did_recovered #1356

cpina opened this issue Mar 4, 2024 · 1 comment · May be fixed by #1599

Comments

@cpina
Copy link
Contributor

cpina commented Mar 4, 2024

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?

wyardley added a commit to wyardley/simplemonitor that referenced this issue Feb 9, 2025
Fixes jamesoff#1356
The tests for `did_recovery` and `did_recovered` touch a file that they
leave around.
While we could use a temporary file, in this context, it seems like
mocking subprocess.Popen should be sufficient.
@wyardley wyardley linked a pull request Feb 9, 2025 that will close this issue
@wyardley
Copy link

wyardley commented Feb 9, 2025

Let me know if #1599 is good enough as a test. I think for a unit test, this is sufficient, but I could use a temporary file if it's necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants