Skip to content

Commit

Permalink
test_rule_data: Avoid dual use of i
Browse files Browse the repository at this point in the history
Using i in two loops fails on Python 2.7

Related to #30
  • Loading branch information
jayvdb committed Apr 20, 2020
1 parent 8830ea1 commit 9152b3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_rule_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def _collate_preload():
_indirect_preload_names = _collate_preload()
_direct_names = [i.name for i in rules.values()]
_rule_names = _direct_names + _indirect_preload_names
normalised_bad_metadata = [normalize(i) for i in bad_metadata]


@expand
Expand All @@ -27,7 +28,7 @@ class TestRuleKey(_TestBase):
ignore_missing = [
i.name
for i in rules.values()
if normalize(i.name) in [normalize(i) for i in bad_metadata]
if normalize(i.name) in normalised_bad_metadata
]

@foreach(names)
Expand Down

0 comments on commit 9152b3f

Please sign in to comment.