Skip to content

Commit

Permalink
swap inputs to DeepDiff
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Sep 15, 2023
1 parent 2fdcca2 commit 541cd48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion romancal/regtest/regtestdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,12 @@ def compare_asdf(result, truth, ignore=None, rtol=1e-05, atol=1e-08, equal_nan=T
with asdf.open(result, **open_kwargs) as af0, asdf.open(
truth, **open_kwargs
) as af1:
# swap the inputs here so DeepDiff(truth, result)
# this will create output with 'new_value' referring to
# the value in the result and 'old_value' referring to the truth
diff = deepdiff.DeepDiff(
af0.tree,
af1.tree,
af0.tree,
ignore_nan_inequality=equal_nan,
custom_operators=operators,
exclude_paths=exclude_paths,
Expand Down

0 comments on commit 541cd48

Please sign in to comment.