Skip to content

Commit

Permalink
more test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DomFijan authored Jan 4, 2024
1 parent a62a824 commit 29b3f29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_water_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def test_save_results_onlyO():
wc = WaterClustering(10)
wc._waterO.append(np.asarray([0.0, 0.0, 0.0]))
wc._waterO.append(np.asarray([0.0, 2.0, 0.0]))
wc._water_type.append("onlyO")
wc._water_type.append("onlyO")
wc._water_type.append("O_clust")
wc._water_type.append("O_clust")
wc.save_results(f.name)
a, b, _, _ = read_results(f.name)
for i, j in zip(a, wc.water_type):
Expand Down Expand Up @@ -159,13 +159,13 @@ def test_restart_cluster_onlyO():
wc = WaterClustering(10, water_types_to_find=["onlyO"])
wc._waterO.append(np.asarray([0.0, 0.0, 0.0]))
wc._waterO.append(np.asarray([0.0, 2.0, 0.0]))
wc._water_type.append("onlyO")
wc._water_type.append("onlyO")
wc._water_type.append("O_clust")
wc._water_type.append("O_clust")
wc.save_results(partial_results_file.name)
# restart clustering
wc.restart_cluster(partial_results_file.name, partial_data_file.name)
# check results
assert wc.water_type == ["onlyO", "onlyO"]
assert wc.water_type == ["O_clust", "O_clust"]
npt.assert_allclose(wc.waterO, np.asarray([[0.0, 0.0, 0.0], [0.0, 2.0, 0.0]]))


Expand Down

0 comments on commit 29b3f29

Please sign in to comment.