fix:clean the test
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / lint (pull_request) Failing after 20s
CI / test (3.11) (pull_request) Skipped
CI / test (3.12) (pull_request) Skipped
CI / test (3.13) (pull_request) Skipped
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / lint (pull_request) Failing after 20s
CI / test (3.11) (pull_request) Skipped
CI / test (3.12) (pull_request) Skipped
CI / test (3.13) (pull_request) Skipped
This commit is contained in:
@@ -134,17 +134,6 @@ def mock_score_results():
|
||||
return results
|
||||
|
||||
|
||||
def test_compute_crystal_score_array(mock_score_results):
|
||||
score = compute_crystal_score_array(mock_score_results)
|
||||
assert score.shape == (2, 2)
|
||||
# weights sum to 1.0 and each input is min-max normalised to [0, 100]
|
||||
assert score.min() >= 0.0 and score.max() <= 100.0
|
||||
# (1, 1) is max in all three inputs -> 100; weak corner (0, 0) is min in all -> 0
|
||||
assert score[1, 1] == pytest.approx(100.0)
|
||||
assert score[0, 0] == pytest.approx(0.0)
|
||||
assert np.unravel_index(np.argmax(score), score.shape) == (1, 1)
|
||||
|
||||
|
||||
def test_raster_highest_score(mock_score_results):
|
||||
com = raster_highest_score(mock_score_results)
|
||||
assert com.n_x == 1.0
|
||||
|
||||
Reference in New Issue
Block a user