Add a few more testcases for check_int_positive

This commit is contained in:
Matthias 2019-05-24 06:22:27 +02:00
parent 253025c0fe
commit 7bbe8b2483

View File

@ -1,5 +1,4 @@
# pragma pylint: disable=missing-docstring, C0103
import argparse
import pytest
@ -194,3 +193,9 @@ def test_check_int_positive() -> None:
Arguments.check_int_positive(-6)
assert Arguments.check_int_positive(2.5) == 2
assert Arguments.check_int_positive("3") == 3
with pytest.raises(argparse.ArgumentTypeError):
Arguments.check_int_positive("3.5")
with pytest.raises(argparse.ArgumentTypeError):
Arguments.check_int_positive("DeadBeef")