Skip to content

Commit

Permalink
Ignore errors in test cleanup
Browse files Browse the repository at this point in the history
There seems to be a race condition when running this cleanup on github
actions which results in
> FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.ssh'
  • Loading branch information
lucc committed Jul 31, 2024
1 parent b2f1df7 commit c337c53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/db/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class TestMessageFromFile(TestCaseClassCleanup):
@classmethod
def setUpClass(cls):
home = tempfile.mkdtemp()
cls.addClassCleanup(shutil.rmtree, home)
cls.addClassCleanup(lambda : shutil.rmtree(home, ignore_errors=True))
mock_home = mock.patch.dict(os.environ, {'GNUPGHOME': home})
mock_home.start()
cls.addClassCleanup(mock_home.stop)
Expand Down

0 comments on commit c337c53

Please sign in to comment.