summaryrefslogtreecommitdiff
path: root/testenv
diff options
context:
space:
mode:
Diffstat (limited to 'testenv')
-rw-r--r--testenv/tests/validators/test_kvm.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/testenv/tests/validators/test_kvm.py b/testenv/tests/validators/test_kvm.py
index 27bc1d67..8e9029ab 100644
--- a/testenv/tests/validators/test_kvm.py
+++ b/testenv/tests/validators/test_kvm.py
@@ -238,6 +238,20 @@ def test_fail__valid_ugpio_item(validator: Callable[[Any], str], arg: Any) -> No
# =====
[email protected]("arg", ["foo", " bar", " baz "])
+def test_ok__valid_ugpio_driver_variants(arg: Any) -> None:
+ value = valid_ugpio_driver(arg, set(["foo", "bar", "baz"]))
+ assert type(value) == str # pylint: disable=unidiomatic-typecheck
+ assert value == str(arg).strip()
+
+
[email protected]("arg", ["BAR", " ", "", None])
+def test_fail__valid_ugpio_driver_variants(arg: Any) -> None:
+ with pytest.raises(ValidatorError):
+ print(valid_ugpio_driver(arg, set(["foo", "bar", "baz"])))
+
+
+# =====
@pytest.mark.parametrize("arg", ["Input ", " OUTPUT "])
def test_ok__valid_ugpio_mode(arg: Any) -> None:
assert valid_ugpio_mode(arg) == arg.strip().lower()