File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22This module tests the toolkit functions implemented in the clas EPyT.
33"""
44import os
5+ import numpy as np
56from epanet_plus import EPyT , EpanetConstants
67
78
@@ -88,7 +89,10 @@ def __test_code(epanet_api: EPyT):
8889 assert len (epanet_api .getnodevalues (EpanetConstants .EN_PRESSURE )) > 0
8990 assert len (epanet_api .getlinkvalues (EpanetConstants .EN_FLOW )) > 0
9091 assert len (epanet_api .getnodevalues (EpanetConstants .EN_QUALITY )) > 0
91- assert len (epanet_api .getlinkvalues (EpanetConstants .EN_QUALITY )) > 0
92+ assert len (epanet_api .getlinkvalues (EpanetConstants .EN_QUALITY )) > 0
93+
94+ assert np .all (epanet_api .getnodevalues_numpy (EpanetConstants .EN_QUALITY ) == np .array (epanet_api .getnodevalues (EpanetConstants .EN_QUALITY ))) == True
95+ assert np .all (epanet_api .getlinkvalues_numpy (EpanetConstants .EN_QUALITY ) == np .array (epanet_api .getlinkvalues (EpanetConstants .EN_QUALITY ))) == True
9296
9397 tstep = epanet_api .nextH ()
9498 epanet_api .nextQ ()
You can’t perform that action at this time.
0 commit comments