diff options
Diffstat (limited to 'testenv')
-rw-r--r-- | testenv/tests/validators/test_ugpio.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testenv/tests/validators/test_ugpio.py b/testenv/tests/validators/test_ugpio.py index 9b03ab60..7207fd71 100644 --- a/testenv/tests/validators/test_ugpio.py +++ b/testenv/tests/validators/test_ugpio.py @@ -29,6 +29,7 @@ from kvmd.validators import ValidatorError from kvmd.validators.ugpio import valid_ugpio_driver from kvmd.validators.ugpio import valid_ugpio_channel from kvmd.validators.ugpio import valid_ugpio_mode +from kvmd.validators.ugpio import valid_ugpio_view_title from kvmd.validators.ugpio import valid_ugpio_view_table from kvmd.plugins.ugpio import UserGpioModes @@ -95,6 +96,19 @@ def test_fail__valid_ugpio_mode(arg: Any) -> None: # ===== @pytest.mark.parametrize("arg,retval", [ + ([], []), + ("", ""), + ("ab", "ab"), + ([""], [""]), + ([[]], ["[]"]), + (["a", None], ["a", "None"]), +]) +def test_ok__valid_ugpio_view_title(arg: Any, retval: Any) -> None: + assert valid_ugpio_view_title(arg) == retval + + +# ===== [email protected]("arg,retval", [ ([], []), ({}, []), ([[]], [[]]), |