Skip to content

Commit 5e1e507

Browse files
author
Agnieszka Makulska
committed
improving the test
1 parent 136eeaa commit 5e1e507

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/python/unit/blk_1m_ice.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
sys.path.insert(0, "../../bindings/python/")
33

44
from numpy import array as arr_t # ndarray dtype default to float64, while array's is int64!
5+
import numpy as np
56

67
from libcloudphxx import blk_1m
78

@@ -52,8 +53,17 @@
5253
print('iceA_flux='+str(flux_iceA))
5354
print('iceB_flux='+str(flux_iceB))
5455

56+
assert np.isnan(rv) == False
57+
assert np.isnan(rc) == False
58+
assert np.isnan(rr) == False
59+
assert np.isnan(ria) == False
60+
assert np.isnan(rib) == False
61+
5562
assert rv >= 0
5663
assert rc >= 0
5764
assert rr >= 0
5865
assert ria >= 0
59-
assert rib >= 0
66+
assert rib >= 0
67+
68+
assert np.isclose(ria, 2.7564e-05, rtol=1e-5, atol=1e-8)
69+
assert np.isclose(rib, 3.2808e-06, rtol=1e-5, atol=1e-8)

0 commit comments

Comments
 (0)