Add test for parameter loading
This commit is contained in:
@@ -12,7 +12,6 @@ from math import ceil
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import numpy as np
|
||||
import progressbar
|
||||
import rapidjson
|
||||
from colorama import Fore, Style
|
||||
|
@@ -327,10 +327,10 @@ class HyperStrategyMixin(object):
|
||||
try:
|
||||
params = json_load(filename.open('r'))
|
||||
if params.get('strategy_name') != self.__class__.__name__:
|
||||
raise OperationalException('Invalid parameter file provided')
|
||||
raise OperationalException('Invalid parameter file provided.')
|
||||
return params
|
||||
except ValueError:
|
||||
logger.warning("Invalid parameter file.")
|
||||
logger.warning("Invalid parameter file format.")
|
||||
return {}
|
||||
logger.info("Found no parameter file.")
|
||||
|
||||
|
Reference in New Issue
Block a user