From c0dc6f46fdb5e0f692ad89870639f16199e97692 Mon Sep 17 00:00:00 2001 From: Matthew Clapp Date: Tue, 29 Sep 2020 13:58:31 -0700 Subject: [PATCH 1/3] Install nox with pip arg --use-feature-2020-resolver. --- .github/workflows/on-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index d8f3194ad3..a134975273 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -87,7 +87,7 @@ jobs: python -m pip install wheel python -m pip install regex - name: Install native-venv version of nox - run: pip install git+https://github.com/cs01/nox.git@5ea70723e9e6#egg=nox + run: pip install --use-feature=2020-resolver git+https://github.com/cs01/nox.git@5ea70723e9e6#egg=nox - name: Execute Tests run: | nox --non-interactive --session tests-${{ matrix.python-version }} From 7351078ac7af1df1a6e25e335fad4fe61e1672e1 Mon Sep 17 00:00:00 2001 From: Matthew Clapp Date: Tue, 29 Sep 2020 14:06:32 -0700 Subject: [PATCH 2/3] Lock ansible version to make test pass. --- tests/test_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_install.py b/tests/test_install.py index 09027c4698..004ed36a2b 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -47,12 +47,12 @@ def test_install_easy_packages(capsys, pipx_temp_env, caplog, package): @pytest.mark.parametrize( - "package", ["cloudtoken", "awscli", "ansible", "shell-functools"] + "package", ["cloudtoken", "awscli", "ansible==2.9.13", "shell-functools"] ) def test_install_tricky_packages(capsys, pipx_temp_env, caplog, package): if os.getenv("FAST"): pytest.skip("skipping slow tests") - if sys.platform.startswith("win") and package == "ansible": + if sys.platform.startswith("win") and package == "ansible==2.9.13": pytest.skip("Ansible is not installable on Windows") install_package(capsys, pipx_temp_env, caplog, package) From f44ad91aa80aa3708e14ec40d53c12454f62711f Mon Sep 17 00:00:00 2001 From: Matthew Clapp Date: Tue, 29 Sep 2020 14:13:08 -0700 Subject: [PATCH 3/3] Fix package_name. --- tests/test_install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_install.py b/tests/test_install.py index 004ed36a2b..8172425fb7 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -1,4 +1,5 @@ import os +import re import sys from unittest import mock @@ -55,7 +56,9 @@ def test_install_tricky_packages(capsys, pipx_temp_env, caplog, package): if sys.platform.startswith("win") and package == "ansible==2.9.13": pytest.skip("Ansible is not installable on Windows") - install_package(capsys, pipx_temp_env, caplog, package) + install_package( + capsys, pipx_temp_env, caplog, package, re.sub(r"==.+$", "", package) + ) # TODO: Add git+... spec when git is in binpath of tests (Issue #303)