Skip to content

Commit 6420d09

Browse files
committed
fix minimum test
1 parent 9b16590 commit 6420d09

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _get_minimum_versions(dependencies, python_version):
6666
for dependency in dependencies:
6767
if '@' in dependency:
6868
name, url = dependency.split(' @ ')
69-
min_versions[name] = f'{name} @ {url}'
69+
min_versions[name] = f'{url}#egg={name}'
7070
continue
7171

7272
req = Requirement(dependency)

tests/test_tasks.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
"""Tests for the ``tasks.py`` file."""
2+
13
from tasks import _get_minimum_versions
24

35

46
def test_get_minimum_versions():
57
"""Test the ``_get_minimum_versions`` method.
8+
69
The method should return the minimum versions of the dependencies for the given python version.
710
If a library is linked to an URL, the minimum version should be the URL.
811
"""
@@ -13,7 +16,7 @@ def test_get_minimum_versions():
1316
"pandas>=1.2.0,<2;python_version<'3.10'",
1417
"pandas>=1.3.0,<2;python_version>='3.10'",
1518
'humanfriendly>=8.2,<11',
16-
'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas'
19+
'pandas @ git+https://github.com/pandas-dev/pandas.git@master',
1720
]
1821

1922
# Run
@@ -23,12 +26,12 @@ def test_get_minimum_versions():
2326
# Assert
2427
expected_versions_39 = [
2528
'numpy==1.20.0',
26-
'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas',
29+
'git+https://github.com/pandas-dev/pandas.git@master#egg=pandas',
2730
'humanfriendly==8.2',
2831
]
2932
expected_versions_310 = [
3033
'numpy==1.23.3',
31-
'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas',
34+
'git+https://github.com/pandas-dev/pandas.git@master#egg=pandas',
3235
'humanfriendly==8.2',
3336
]
3437

0 commit comments

Comments
 (0)