Skip to content

Commit dc3b63a

Browse files
author
Andrei Neagu
committed
fixed broken test
1 parent c2eea57 commit dc3b63a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/comparing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_files_info_from_itrable(items: Iterable[Path]) -> _FilesInfo:
3030
return {f.name: f for f in items if f.is_file()}
3131

3232

33-
def _compute_hash(file_path: Path) -> tuple[Path, str]:
33+
def compute_hash(file_path: Path) -> tuple[Path, str]:
3434
with Path.open(file_path, "rb") as file_to_hash:
3535
file_hash = hashlib.md5() # noqa: S324
3636
chunk = file_to_hash.read(8192)
@@ -48,7 +48,7 @@ async def compute_hashes(file_paths: list[Path]) -> dict[Path, str]:
4848

4949
with ProcessPoolExecutor() as prcess_pool_executor:
5050
tasks = [
51-
loop.run_in_executor(prcess_pool_executor, _compute_hash, file_path)
51+
loop.run_in_executor(prcess_pool_executor, compute_hash, file_path)
5252
for file_path in file_paths
5353
]
5454
# pylint: disable=unnecessary-comprehension

packages/service-library/tests/archiving_utils/test_archiving_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from faker import Faker
1616
from pydantic import ByteSize, TypeAdapter
1717
from pytest_benchmark.plugin import BenchmarkFixture
18-
from pytest_simcore.helpers.comparing import compute_hashes
18+
from pytest_simcore.helpers.comparing import compute_hash, compute_hashes
1919
from servicelib.archiving_utils import archive_dir, unarchive_dir
2020

2121

@@ -396,8 +396,8 @@ async def test_regression_archive_hash_does_not_change(
396396
await archive_dir(mixed_file_types, second_archive, compress=compress)
397397
assert second_archive.exists()
398398

399-
_, first_hash = _compute_hash(first_archive)
400-
_, second_hash = _compute_hash(second_archive)
399+
_, first_hash = compute_hash(first_archive)
400+
_, second_hash = compute_hash(second_archive)
401401
assert first_hash == second_hash
402402

403403

0 commit comments

Comments
 (0)