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:
@ -22,9 +22,15 @@
|
||||
"""test data types."""
|
||||
|
||||
import frappy.errors
|
||||
from frappy.errors import EXCEPTIONS, SECoPError
|
||||
|
||||
|
||||
def test_errors():
|
||||
"""check consistence of frappy.errors.EXCEPTIONS"""
|
||||
for e in frappy.errors.EXCEPTIONS.values():
|
||||
assert frappy.errors.EXCEPTIONS[e().name] == e
|
||||
for e in EXCEPTIONS.values():
|
||||
assert EXCEPTIONS[e().name] == e
|
||||
# check that all defined secop errors are in EXCEPTIONS
|
||||
for cls in frappy.errors.__dict__.values():
|
||||
if isinstance(cls, type) and issubclass(cls, SECoPError):
|
||||
if cls != SECoPError:
|
||||
assert cls().name in EXCEPTIONS
|
||||
|
Reference in New Issue
Block a user