58d2a016ce
* added ruff docs * style: Run ruff and black before yapf pass * yapf -r -i (23 fixes) * fixed conf.py and ran ruff format . * fixed conf.py 2 * formatted argparser.py * formatted src/rocprof_compute_analyze * formatted src/rocprof_compute_profile * formatted soc_base.py * formatted rocprof_compute_tui * formatted gui_components * formatted src/utils * formatted tests/ * format extra files * cleanup * fix test_utils.py * fixed typos * Update pyproject.toml * Update README.md * Update test_utils.py --------- Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com> Co-authored-by: James Siddeley <James.Siddeley@amd.com> Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
17 lines
472 B
Python
17 lines
472 B
Python
import hashlib
|
|
from pathlib import Path
|
|
|
|
import yaml
|
|
|
|
|
|
def test_modification_time():
|
|
# Ensure hash map consistency
|
|
hash_path = Path("utils/autogen_hash.yaml")
|
|
with open(hash_path, "r") as f:
|
|
hash_map = yaml.safe_load(f)
|
|
for file, hash in hash_map.items():
|
|
file_hash = hashlib.sha256(Path(file).read_bytes()).hexdigest()
|
|
assert file_hash == hash, (
|
|
f"Hash mismatch for {file}: expected {hash}, got {file_hash}"
|
|
)
|