Commit 1603dcba authored by Chih-Hsuan Yen's avatar Chih-Hsuan Yen Committed by Jason R. Coombs

Fix test_test_command_install_requirements with pip 20.3+

setuptools appends --find-links to pip if dependency_links is found, and
both takes URLs [1][2].

[1] https://github.com/pypa/setuptools/blob/v51.0.0/docs/userguide/dependency_management.rst#dependencies-that-arent-in-pypi
[2] https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-f
parent d97cb2b3
Fix tests with pip 20.3+
-- by :user:`yan12125`
...@@ -2,6 +2,8 @@ import glob ...@@ -2,6 +2,8 @@ import glob
import os import os
import sys import sys
import pathlib
import pytest import pytest
from pytest import yield_fixture from pytest import yield_fixture
from pytest_fixture_config import yield_requires_config from pytest_fixture_config import yield_requires_config
...@@ -124,7 +126,7 @@ def _check_test_command_install_requirements(virtualenv, tmpdir): ...@@ -124,7 +126,7 @@ def _check_test_command_install_requirements(virtualenv, tmpdir):
make_nspkg_sdist(str(dist_path), distname, version) make_nspkg_sdist(str(dist_path), distname, version)
return dist_path return dist_path
dependency_links = [ dependency_links = [
str(dist_path) pathlib.Path(str(dist_path)).as_uri()
for dist_path in ( for dist_path in (
sdist('foobar', '2.4'), sdist('foobar', '2.4'),
sdist('bits', '4.2'), sdist('bits', '4.2'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment