Add more unit tests
Little naming cleanup (first round)
This commit is contained in:
@@ -51,7 +51,7 @@ class CastToInt:
|
||||
def convert_to_int(self, input: Any) -> tuple[int]:
|
||||
try:
|
||||
return (int(input),)
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
raise ValueError(f"Cannot convert {input} to an INT.")
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ class CastToFloat:
|
||||
def convert_to_float(self, input: Any) -> tuple[float]:
|
||||
try:
|
||||
return (float(input),)
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
raise ValueError(f"Cannot convert {input} to a FLOAT.")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user