int datatype must not accept fractional floats

- added also test for this

Change-Id: I1c3ad92bc10131d6cd096496230222c999f0097e
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22737
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2020-03-19 15:58:35 +01:00
parent 434ef4a423
commit 8c9d5d4e5c
2 changed files with 8 additions and 2 deletions

View File

@ -109,8 +109,13 @@ def test_IntRange():
dt('XX')
with pytest.raises(ValueError):
dt([19, 'X'])
with pytest.raises(ValueError):
dt(1.3)
with pytest.raises(ValueError):
dt('1.3')
dt(1)
dt(0)
dt('1')
with pytest.raises(ProgrammingError):
IntRange('xc', 'Yx')