mlair.helpers.testing
¶
Helper functions that are used to simplify testing.
Module Contents¶
Classes¶
Assert that a given string meets some expectations. |
Functions¶
|
|
|
|
|
Check for equality in nested structures. Use precision to indicate number of decimals to check for consistency |
-
class
mlair.helpers.testing.
PyTestRegex
(pattern: Union[str, Pattern], flags: int = 0)¶ Assert that a given string meets some expectations.
Use like
>>> PyTestRegex(r"TestString\d+") == "TestString" False >>> PyTestRegex(r"TestString\d+") == "TestString2" True
- Parameters
pattern – pattern or string to use for regular expresssion
flags – python re flags
-
mlair.helpers.testing.
PyTestAllEqual
(check_list: List)¶
-
mlair.helpers.testing.
get_all_args
(*args, remove=None, add=None)¶
-
mlair.helpers.testing.
check_nested_equality
(obj1, obj2, precision=None, skip_args=None)¶ Check for equality in nested structures. Use precision to indicate number of decimals to check for consistency