fatf.utils.testing.transparency.is_explanation_equal_list

fatf.utils.testing.transparency.is_explanation_equal_list(dict1: Dict[str, List[Tuple[str, Union[Iterable[float], float]]]], dict2: Dict[str, List[Tuple[str, Union[Iterable[float], float]]]], atol: float = 0.1) → bool[source]

Tests if the two dictionaries of a given structure are equal.

New in version 0.0.2.

The both of the input parameters must be a dictionary with string keys and list values. The latter is composed of 2-tuples of strings and floats or float iterables.

The keys in the dictionary and the tuples must match exactly, while the floats only need to be approximately equal. The ordering of the tuples in the list does not need to be the same.

Parameters
dict1Dictionary[string,List[Tuple[string, Union[Iterable[float], float]]]

The first dictionary to be compared.

dict2Dictionary[string,List[Tuple[string, Union[Iterable[float], float]]]

The second dictionary to be compared.

atolfloat, optional (default=0.1)

The absolute tolerance between each two matching numbers in the inner dictionaries.

Returns
equalboolean

True if the dictionaries are the same, False otherwise.