-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix (utils.patterns): recognize one digit version in filename
fix (utils.patterns): version part in filename must be present according PEP491
- Loading branch information
1 parent
a4d42a3
commit 959d2cd
Showing
2 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import pytest | ||
|
||
from poetry.utils import patterns | ||
|
||
|
||
@pytest.mark.parametrize( | ||
["filename", "expected"], | ||
[ | ||
( | ||
"markdown_captions-2-py3-none-any.whl", | ||
{ | ||
"namever": "markdown_captions-2", | ||
"name": "markdown_captions", | ||
"ver": "2", | ||
"build": None, | ||
"pyver": "py3", | ||
"abi": "none", | ||
"plat": "any", | ||
}, | ||
), | ||
( | ||
"SQLAlchemy-1.3.20-cp27-cp27mu-manylinux2010_x86_64.whl", | ||
{ | ||
"namever": "SQLAlchemy-1.3.20", | ||
"name": "SQLAlchemy", | ||
"ver": "1.3.20", | ||
"build": None, | ||
"pyver": "cp27", | ||
"abi": "cp27mu", | ||
"plat": "manylinux2010_x86_64", | ||
}, | ||
), | ||
], | ||
) | ||
def test_wheel_file_re(filename, expected): | ||
match = patterns.wheel_file_re.match(filename) | ||
groups = match.groupdict() | ||
|
||
assert groups == expected |