File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 11import json
2+ from pathlib import Path
3+
24import pytest
35import numpy as np
46from ms2deepscore .SettingsMS2Deepscore import SettingsMS2Deepscore
@@ -63,17 +65,10 @@ def test_coerce_string_to_bool():
6365 assert settings_false .use_fixed_set is False
6466
6567
66- #def test_coerce_invalid_string_to_bool():
67- # """Test that invalid strings for bool raise an exception."""
68- # with pytest.raises(ValueError):
69- # SettingsMS2Deepscore(**{"use_fixed_set": "NotAValidBool"})
70-
71-
72- #def test_coerce_string_to_path():
73- # """Test if string paths are coerced into Path objects."""
74- # settings = SettingsMS2Deepscore(**{"model_file_name": "model.pt"})
75- # assert isinstance(settings.model_file_name, Path)
76- # assert settings.model_file_name == Path("model.pt")
68+ def test_coerce_invalid_string_to_bool ():
69+ """Test that invalid strings for bool raise an exception."""
70+ with pytest .raises (TypeError ):
71+ SettingsMS2Deepscore (** {"use_fixed_set" : "NotAValidBool" })
7772
7873
7974def test_save_settings (tmp_path ):
You can’t perform that action at this time.
0 commit comments