Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
qa
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankrb committed Feb 6, 2024
1 parent 3bc049c commit 347114a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions scripts/speed-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def main():
if path.endswith(".yaml"):
with open(path, "r") as f:
path = yaml.safe_load(f)

ds = open_dataset(path)

total = len(ds)
Expand All @@ -124,9 +124,7 @@ def main():
indexes = indexes[: args.count]

if nworkers > 1:
tests = Tests(
[SpeedTest(path, indexes[i::nworkers]) for i in range(nworkers)]
)
tests = Tests([SpeedTest(path, indexes[i::nworkers]) for i in range(nworkers)])

with Pool(nworkers) as pool:
pool.map(tests, range(nworkers))
Expand Down
3 changes: 2 additions & 1 deletion tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ def compare_zarr(dir1, dir2):
assert a_ == b_, (a, b)
for k, date in zip(range(a.shape[0]), a.dates):
for j in range(a.shape[1]):
assert (a[k, j] == b[k, j]).all(), (k, date,j, a[k, j], b[k, j])
assert (a[k, j] == b[k, j]).all(), (k, date, j, a[k, j], b[k, j])
compare(dir1, dir2)


def compare(dir1, dir2):
"""Compare two directories recursively."""
files1 = set(os.listdir(dir1))
Expand Down

0 comments on commit 347114a

Please sign in to comment.