diff options
author | Devaev Maxim <[email protected]> | 2019-09-30 07:55:32 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-09-30 07:55:32 +0300 |
commit | bcae85c8b98059b091c9aeea70eaf414b2ad068b (patch) | |
tree | 397fa878419a530818952c7111ad5b03fb974e81 /testenv | |
parent | 5b8ac7ba70ee0ade4139fa888a23e4d4d3eb22cd (diff) |
hdmi: decreased stream restart
Diffstat (limited to 'testenv')
-rw-r--r-- | testenv/main.yaml | 2 | ||||
-rw-r--r-- | testenv/tests/validators/test_basic.py | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testenv/main.yaml b/testenv/main.yaml index f0f48d4d..e1589a34 100644 --- a/testenv/main.yaml +++ b/testenv/main.yaml @@ -25,6 +25,8 @@ kvmd: streamer: cap_pin: 17 conv_pin: 18 + sync_delay: 0 + init_delay: 1 init_restart_after: 1 desired_fps: 30 max_fps: 40 diff --git a/testenv/tests/validators/test_basic.py b/testenv/tests/validators/test_basic.py index 96feb666..15964a54 100644 --- a/testenv/tests/validators/test_basic.py +++ b/testenv/tests/validators/test_basic.py @@ -29,6 +29,7 @@ from kvmd.validators import ValidatorError from kvmd.validators.basic import valid_bool from kvmd.validators.basic import valid_number from kvmd.validators.basic import valid_int_f1 +from kvmd.validators.basic import valid_float_f0 from kvmd.validators.basic import valid_float_f01 from kvmd.validators.basic import valid_string_list @@ -96,6 +97,20 @@ def test_fail__valid_int_f1(arg: Any) -> None: # ===== [email protected]("arg", [0, 1, 5, "5 ", "5.0 "]) +def test_ok__valid_float_f0(arg: Any) -> None: + value = valid_float_f0(arg) + assert type(value) == float # pylint: disable=unidiomatic-typecheck + assert value == float(str(arg).strip()) + + [email protected]("arg", ["test", "", None, -6, "-6"]) +def test_fail__valid_float_f0(arg: Any) -> None: + with pytest.raises(ValidatorError): + print(valid_float_f0(arg)) + + +# ===== @pytest.mark.parametrize("arg", [0.1, 1, 5, "5 ", "5.0 "]) def test_ok__valid_float_f01(arg: Any) -> None: value = valid_float_f01(arg) |