Skip to content

Commit

Permalink
Remove outdated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niekdejonge committed Oct 25, 2024
1 parent d3b3e52 commit 407ffc0
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions tests/test_ms2deepscore_evaluated.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,51 +56,3 @@ def test_MS2DeepScore_score_matrix():
])
assert np.allclose(expected_scores, scores["score"], atol=1e-6), "Expected different scores."
assert scores["predicted_absolute_error"].shape == (3, 4)


# def test_MS2DeepScore_score_matrix_symmetric():
# """Test score calculation using *.matrix* method."""
# spectrums, _, similarity_measure = get_test_ms2deepscore_instance()
# scores = similarity_measure.matrix(spectrums[:4], spectrums[:4], is_symmetric=True)
# expected_scores = np.array([
# [1. , 0.99036639, 0.99084978, 0.98811793],
# [0.99036639, 1. , 0.99399306, 0.96436209],
# [0.99084978, 0.99399306, 1. , 0.97351075],
# [0.98811793, 0.96436209, 0.97351075, 1. ]])
# assert np.allclose(expected_scores, scores, atol=1e-6), "Expected different scores."


# def test_MS2DeepScore_score_matrix_symmetric_wrong_use():
# """Test if *.matrix* method gives correct exception."""
# spectrums, _, similarity_measure = get_test_ms2_deep_score_instance()
# expected_msg = "Expected references to be equal to queries for is_symmetric=True"
# with pytest.raises(AssertionError) as msg:
# _ = similarity_measure.matrix(spectrums[:4],
# [spectrums[i] for i in [1,2,3,0]],
# is_symmetric=True)
# assert expected_msg in str(msg), "Expected different exception message"
# assert not similarity_measure.multi_inputs

# def get_test_ms2_deep_score_instance_additional_inputs():
# """Load data and models for MS2DeepScore unit tests."""
# spectrums = load_processed_spectrums()
#
# # Load pretrained model
# model_file = TEST_RESOURCES_PATH / "testmodel_additional_input.hdf5"
# model = load_model(model_file)
#
# similarity_measure = MS2DeepScore(model)
# return spectrums, model, similarity_measure

# def test_MS2DeepScore_score_additional_input_feature():
# """Test vector creation."""
# spectrums, model, similarity_measure = get_test_ms2_deep_score_instance_additional_inputs()
#
# binned_spectrum0 = model.spectrum_binner.transform([spectrums[0]])[0]
# inputs = similarity_measure._create_input_vector(binned_spectrum0)
# assert isinstance(inputs, list), "Expected inputs to be list"
# assert inputs[0].shape == (1, 543), "Expected different vector shape"
# assert inputs[1].shape == (1, model.nr_of_additional_inputs), "Expected different shape for additional_input"
# assert isinstance(inputs[0], np.ndarray), "Expected vector to be numpy array"
# assert inputs[0][0, 92] == 0.0, "Expected different entries"
# assert similarity_measure.multi_inputs

0 comments on commit 407ffc0

Please sign in to comment.