refactor tests and add new

This commit is contained in:
2025-12-06 11:55:50 +03:00
parent a2ef2652ed
commit 1d2ab6f6bb
17 changed files with 294 additions and 31 deletions
+3 -6
View File
@@ -53,10 +53,7 @@ class Flag:
if isinstance(self.possible_values, Pattern):
return bool(self.possible_values.match(input_flag_value))
if isinstance(self.possible_values, list):
return input_flag_value in self.possible_values
return False
return input_flag_value in self.possible_values
@property
def string_entity(self) -> str:
@@ -88,9 +85,9 @@ class InputFlag:
self,
name: str,
*,
prefix: PREFIX_TYPE = "--",
input_value: str,
status: ValidationStatus | None,
prefix: PREFIX_TYPE = "--",
status: ValidationStatus | None = None,
):
"""
Public. The entity of the flag of the entered command