From 6d20cbca23d15f7128516617fc45db374f781ce8 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 8 Sep 2019 15:19:03 +0300 Subject: [PATCH] Remove noqa workaround --- tests/functional/test_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index a8d3cf9628e..76e8b3ce4a8 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -5,9 +5,8 @@ import textwrap from os.path import curdir, join, pardir -# Ignore because flake8 can't detect the use inside skipif(). -import pip._vendor.six # noqa: F401 import pytest +from pip._vendor.six import PY2 from pip._internal import pep425tags from pip._internal.cli.status_codes import ERROR, SUCCESS @@ -21,6 +20,8 @@ from tests.lib.local_repos import local_checkout from tests.lib.path import Path +python2_only = pytest.mark.skipif(not PY2, reason="Python 2 only") + @pytest.mark.parametrize('command', ('install', 'wheel')) @pytest.mark.parametrize('variant', ('missing_setuptools', 'bad_setuptools')) @@ -530,7 +531,7 @@ def test_editable_install__local_dir_no_setup_py_with_pyproject( assert 'A "pyproject.toml" file was found' in msg -@pytest.mark.skipif("pip._vendor.six.PY3") +@python2_only @pytest.mark.xfail def test_install_argparse_shadowed(script): # When argparse is in the stdlib, we support installing it