perturbopy.test_utils.compare_data.yaml.equal_dict

perturbopy.test_utils.compare_data.yaml.equal_dict(dict1, dict2, ig_n_tol, path)

Determines if two dicts contain the same value for the same key

Parameters:
  • dict1 (dict) – first dictionary

  • dict2 (dict) – second dictionary

  • ig_n_tol (dict) – dictionary of ignore keywords and tolerances needed to make comparison on values

  • path (str) – pseudo path to this item being compared

Returns:

  • equal_vlaues (bool) – boolean specifying if both dicts contain the same keys and values

  • diff (str) – string which contains the information about the number of failed tests

  • output_res_dict (dict) – list with testing results. Either the item from the produced yaml-file will be saved, or it will be saved with the additional string FAIL