generated from dopt-python/py311
add additional edge case to find models
This commit is contained in:
@@ -56,8 +56,20 @@ def temp_model_folder_only_right(tmp_path_factory) -> Path:
|
||||
|
||||
|
||||
@patch("dopt_sensor_anomalies._find_paths.STOP_FOLDER_NAME", "not-found")
|
||||
def test_get_model_folder_Fail_NotFound():
|
||||
with pytest.raises(FileNotFoundError):
|
||||
def test_get_model_folder_Fail_NotFoundApplicationRoot():
|
||||
with pytest.raises(
|
||||
FileNotFoundError, match="application's root directory could not be determined"
|
||||
):
|
||||
_ = _find_paths.get_model_folder()
|
||||
|
||||
|
||||
@patch("dopt_sensor_anomalies._find_paths.STOP_FOLDER_NAME", "lib")
|
||||
@patch("dopt_sensor_anomalies._find_paths.MODEL_FOLDER_NAME", "not-found")
|
||||
def test_get_model_folder_Fail_NotFoundModelFolder():
|
||||
with pytest.raises(
|
||||
FileNotFoundError,
|
||||
match="model folder was not found in the application's root directory",
|
||||
):
|
||||
_ = _find_paths.get_model_folder()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user