Skip to content

Commit

Permalink
add test_key_from_ireq_normalization
Browse files Browse the repository at this point in the history
Based on jazzband#1570
  • Loading branch information
AndydeCleyre committed Feb 5, 2022
1 parent 82089c8 commit b7c3466
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
get_sys_path_for_python_executable,
is_pinned_requirement,
is_url_requirement,
key_from_ireq,
lookup_table,
lookup_table_from_tuples,
)
Expand Down Expand Up @@ -266,6 +267,13 @@ def test_is_pinned_requirement_editable(from_editable):
assert not is_pinned_requirement(ireq)


def test_key_from_ireq_normalization(from_line):
keys = set()
for line in ("zope.event", "zope-event", "zope_event", "ZOPE.event"):
keys.add(key_from_ireq(from_line(line)))
assert len(keys) == 1


@pytest.mark.parametrize(
("line", "expected"),
(
Expand Down

0 comments on commit b7c3466

Please sign in to comment.