mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Add a few more testcases for check_int_positive
This commit is contained in:
parent
253025c0fe
commit
7bbe8b2483
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user