fixes in datatypes
- Enum.__call__(self, value) should raise BadValueError when value is not hashable - added TextType.copy (DataType.copy will not work here) Change-Id: I6c460991fa1e6595a939fb0814f490d2188c97b4 Reviewed-on: https://forge.frm2.tum.de/review/21015 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -174,7 +174,7 @@ def test_EnumType():
|
||||
dt(-9)
|
||||
with pytest.raises(ValueError):
|
||||
dt(u'XX')
|
||||
with pytest.raises(TypeError):
|
||||
with pytest.raises(ValueError):
|
||||
dt([19, u'X'])
|
||||
|
||||
assert dt(u'a') == 3
|
||||
|
Reference in New Issue
Block a user