Skip to content

Commit

Permalink
fix: improve pytest diff by ignoring falsy items
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Sep 18, 2022
1 parent 2df695e commit 520de01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beet/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def plural(name, count):
def generate_explanation(config, left, right, item_name):
verbose = config.getoption("verbose")

left_keys = set(left)
right_keys = set(right)
left_keys = set(k for k, v in left.items() if v)
right_keys = set(k for k, v in right.items() if v)

common = left_keys & right_keys
same = {key for key in common if left[key] == right[key]}
Expand Down

0 comments on commit 520de01

Please sign in to comment.