:py:mod:`mlair.helpers.testing` =============================== .. py:module:: mlair.helpers.testing .. autoapi-nested-parse:: Helper functions that are used to simplify testing. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: mlair.helpers.testing.PyTestRegex Functions ~~~~~~~~~ .. autoapisummary:: mlair.helpers.testing.PyTestAllEqual mlair.helpers.testing.get_all_args mlair.helpers.testing.check_nested_equality .. py:class:: 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 :param pattern: pattern or string to use for regular expresssion :param flags: python re flags .. py:method:: __eq__(self, actual: str) -> bool Return whether regex matches given string actual or not. .. py:method:: __repr__(self) -> str Show regex pattern. .. py:function:: PyTestAllEqual(check_list: List) .. py:function:: get_all_args(*args, remove=None, add=None) .. py:function:: 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