split BadValue into WrongType and RangeError
in order to match SECoP specification fixes #4668 Change-Id: Ica73a8171536ccc324cf8db915347a6263c2d736 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30625 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
import pytest
|
||||
|
||||
from frappy.datatypes import FloatRange, IntRange, StringType, ValueType
|
||||
from frappy.errors import BadValueError, ConfigError, ProgrammingError
|
||||
from frappy.errors import RangeError, ConfigError, ProgrammingError
|
||||
from frappy.properties import HasProperties, Property
|
||||
from frappy.core import Parameter
|
||||
|
||||
@@ -35,6 +35,7 @@ def Prop(*args, name=None, **kwds):
|
||||
|
||||
|
||||
# Property(description, datatype, default, ...)
|
||||
# pylint: disable=use-dict-literal
|
||||
V_test_Property = [
|
||||
[Prop(StringType(), 'default', extname='extname', mandatory=False),
|
||||
dict(default='default', extname='extname', export=True, mandatory=False)
|
||||
@@ -99,7 +100,7 @@ def test_Properties():
|
||||
assert Cls.aa.extname == '_aa'
|
||||
|
||||
cc = Cls()
|
||||
with pytest.raises(BadValueError):
|
||||
with pytest.raises(RangeError):
|
||||
cc.aa = 137
|
||||
|
||||
assert Cls.bb.default == 0
|
||||
|
||||
Reference in New Issue
Block a user