mirror of
https://github.com/MiSTer-devel/Distribution_MiSTer.git
synced 2026-05-17 03:03:37 +00:00
Removing files created during tests.
This commit is contained in:
committed by
GitHub
parent
a775730db3
commit
a78c6ea3ee
5
.github/tests/test_calculate_db.py
vendored
5
.github/tests/test_calculate_db.py
vendored
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user