common: only try to delete .testfiles dir if it exists

Otherwise, some tests fail with an error.
This commit is contained in:
Hans-Christoph Steiner 2024-05-07 17:14:18 +02:00
parent 18f3acc32e
commit 5745ed4753
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ class CommonTest(unittest.TestCase):
fdroidserver.common.options = None
os.chdir(self.basedir)
self._td.cleanup()
shutil.rmtree(self.tmpdir)
if os.path.exists(self.tmpdir):
shutil.rmtree(self.tmpdir)
def test_parse_human_readable_size(self):
for k, v in (