diff --git a/tasks.py b/tasks.py index f2176b61..be2f0238 100644 --- a/tasks.py +++ b/tasks.py @@ -66,7 +66,7 @@ def _get_minimum_versions(dependencies, python_version): for dependency in dependencies: if '@' in dependency: name, url = dependency.split(' @ ') - min_versions[name] = f'{name} @ {url}' + min_versions[name] = f'{url}#egg={name}' continue req = Requirement(dependency) diff --git a/tests/test_tasks.py b/tests/test_tasks.py index 2b710842..d088673e 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -1,8 +1,11 @@ +"""Tests for the ``tasks.py`` file.""" + from tasks import _get_minimum_versions def test_get_minimum_versions(): """Test the ``_get_minimum_versions`` method. + The method should return the minimum versions of the dependencies for the given python version. If a library is linked to an URL, the minimum version should be the URL. """ @@ -13,7 +16,7 @@ def test_get_minimum_versions(): "pandas>=1.2.0,<2;python_version<'3.10'", "pandas>=1.3.0,<2;python_version>='3.10'", 'humanfriendly>=8.2,<11', - 'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas' + 'pandas @ git+https://github.com/pandas-dev/pandas.git@master', ] # Run @@ -23,12 +26,12 @@ def test_get_minimum_versions(): # Assert expected_versions_39 = [ 'numpy==1.20.0', - 'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas', + 'git+https://github.com/pandas-dev/pandas.git@master#egg=pandas', 'humanfriendly==8.2', ] expected_versions_310 = [ 'numpy==1.23.3', - 'pandas @ git+https://github.com/pandas-dev/pandas.git@master#egg=pandas', + 'git+https://github.com/pandas-dev/pandas.git@master#egg=pandas', 'humanfriendly==8.2', ]