summaryrefslogtreecommitdiff
path: root/testenv/tests/validators/test_ugpio.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-10-08 06:09:33 +0300
committerMaxim Devaev <[email protected]>2022-10-08 06:09:33 +0300
commita39d3dffbe837c15576615656df5a924bcd44831 (patch)
tree407258ff32ac271ec2ccf6069a00e56ce1f04722 /testenv/tests/validators/test_ugpio.py
parent16d9c3815f5bb5ba98f0923efc9f0fad8e2f48a2 (diff)
pikvm/pikvm#803: Ability to use LEDs in GPIO title
Diffstat (limited to 'testenv/tests/validators/test_ugpio.py')
-rw-r--r--testenv/tests/validators/test_ugpio.py14
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", [
([], []),
({}, []),
([[]], [[]]),