From a78c6ea3ee61136e8ea98b2aa21075b586df3c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Sat, 5 Feb 2022 21:04:09 +0100 Subject: [PATCH] Removing files created during tests. --- .github/tests/test_calculate_db.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/tests/test_calculate_db.py b/.github/tests/test_calculate_db.py index 47d77ee06..9fa7b2eff 100755 --- a/.github/tests/test_calculate_db.py +++ b/.github/tests/test_calculate_db.py @@ -1,6 +1,8 @@ #!/usr/bin/env python3 import importlib.util +from pathlib import Path + spec = importlib.util.spec_from_file_location("calculate_db", "../calculate_db.py") calculate_db = importlib.util.module_from_spec(spec) spec.loader.exec_module(calculate_db) @@ -28,6 +30,9 @@ hash2 = calculate_db.hash('db2.json.zip') print("hash1 %s" % hash1) print("hash2 %s" % hash2) +Path('db.json').unlink(missing_ok=True) +Path('db1.json.zip').unlink(missing_ok=True) +Path('db2.json.zip').unlink(missing_ok=True) if hash1 != hash2: print("hash1 is not same as hash2")