update tests
This commit is contained in:
@ -346,16 +346,18 @@ class Option(BaseOption):
|
||||
check_error,
|
||||
is_warnings_only)
|
||||
except ValueError as err:
|
||||
val_err = ValueOptionError(val,
|
||||
if config_bag is undefined or \
|
||||
'demoting_error' not in config_bag.properties:
|
||||
raise ValueOptionError(val,
|
||||
self._display_name,
|
||||
option_bag.ori_option,
|
||||
'{0}'.format(err))
|
||||
if 'demoting_error' in config_bag.properties:
|
||||
warnings.warn_explicit(val_err,
|
||||
ValueErrorWarning,
|
||||
self.__class__.__name__, 0)
|
||||
else:
|
||||
raise val_err
|
||||
warnings.warn_explicit(ValueOptionError(val,
|
||||
self._display_name,
|
||||
option_bag.ori_option,
|
||||
'{0}'.format(err)),
|
||||
ValueErrorWarning,
|
||||
self.__class__.__name__, 0)
|
||||
|
||||
def _validate_calculator(self,
|
||||
callback: Callable,
|
||||
|
@ -28,7 +28,8 @@ class SynDynOption:
|
||||
"""
|
||||
__slots__ = ('rootpath',
|
||||
'opt',
|
||||
'suffix')
|
||||
'suffix',
|
||||
'__weakref__')
|
||||
|
||||
def __init__(self,
|
||||
opt: BaseOption,
|
||||
|
Reference in New Issue
Block a user