mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
tests
This commit is contained in:
@@ -111,15 +111,15 @@ def valid_ugpio_driver(arg: Any, variants: Optional[Set[str]]=None) -> str:
|
||||
return arg
|
||||
|
||||
|
||||
def valid_ugpio_mode(arg: Any) -> str:
|
||||
return check_string_in_list(arg, "GPIO mode", ["input", "output"])
|
||||
|
||||
|
||||
def valid_ugpio_channel(arg: Any) -> str:
|
||||
name = "GPIO channel"
|
||||
return check_len(check_re_match(arg, name, r"^[a-zA-Z_][a-zA-Z0-9_-]*$"), name, 255)
|
||||
|
||||
|
||||
def valid_ugpio_mode(arg: Any) -> str:
|
||||
return check_string_in_list(arg, "GPIO mode", ["input", "output"])
|
||||
|
||||
|
||||
def valid_ugpio_view_table(arg: Any) -> List[List[str]]:
|
||||
try:
|
||||
return [list(map(str, row)) for row in list(arg)]
|
||||
|
||||
Reference in New Issue
Block a user