Skip to content

Commit

Permalink
Revert changes to canonicalize_name (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater authored Feb 5, 2021
1 parent d7b1682 commit 1034515
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion poetry/core/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from collections import Mapping


_canonicalize_regex = re.compile(r"[-_.]+")
_canonicalize_regex = re.compile(r"[-_]+")


def canonicalize_name(name): # type: (str) -> str
Expand Down
4 changes: 1 addition & 3 deletions tests/utils/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ def test_parse_requires():
assert result == expected


@pytest.mark.parametrize(
"raw", ["a-b-c", "a.b-c", "a.b.c", "a_b-c", "a_b_c", "a-b_c", "a.b_c", "a-b.c"]
)
@pytest.mark.parametrize("raw", ["a-b-c", "a_b-c", "a_b_c", "a-b_c"])
def test_utils_helpers_canonical_names(raw):
assert canonicalize_name(raw) == "a-b-c"

Expand Down

0 comments on commit 1034515

Please sign in to comment.