Skip to content

Commit

Permalink
added assert to test_timings unit test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Bommes committed Oct 26, 2024
1 parent fe4f088 commit a64cce1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ def test_timings(self):
tend = time.perf_counter()
telapsed = tend - tstart
times.append(telapsed)
print(f"Timings: mean {np.mean(times)} -- std: {np.std(times)}")
dt_mean = np.mean(times)
dt_std = np.std(times)
print(f"Timings: mean {dt_mean} s -- std: {dt_std} s")
assert 0 < dt_mean < 0.01, f"Mean of frame read operation exceeds maximum ({dt_mean} s > {0.01} s)"
assert 0 < dt_std < 0.001, f"Standard deviation of frame read operation exceeds maximum ({dt_mean} s > {0.01} s)"



Expand Down

0 comments on commit a64cce1

Please sign in to comment.