Add test for parameter loading

This commit is contained in:
Matthias
2021-06-30 06:43:49 +02:00
parent dcf53ac3ff
commit 645da51b5f
4 changed files with 50 additions and 5 deletions

View File

@@ -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.")