Skip to content

Commit 6d20cbc

Browse files
committed
Remove noqa workaround
1 parent fd5ffb6 commit 6d20cbc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/functional/test_install.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
import textwrap
66
from os.path import curdir, join, pardir
77

8-
# Ignore because flake8 can't detect the use inside skipif().
9-
import pip._vendor.six # noqa: F401
108
import pytest
9+
from pip._vendor.six import PY2
1110

1211
from pip._internal import pep425tags
1312
from pip._internal.cli.status_codes import ERROR, SUCCESS
@@ -21,6 +20,8 @@
2120
from tests.lib.local_repos import local_checkout
2221
from tests.lib.path import Path
2322

23+
python2_only = pytest.mark.skipif(not PY2, reason="Python 2 only")
24+
2425

2526
@pytest.mark.parametrize('command', ('install', 'wheel'))
2627
@pytest.mark.parametrize('variant', ('missing_setuptools', 'bad_setuptools'))
@@ -530,7 +531,7 @@ def test_editable_install__local_dir_no_setup_py_with_pyproject(
530531
assert 'A "pyproject.toml" file was found' in msg
531532

532533

533-
@pytest.mark.skipif("pip._vendor.six.PY3")
534+
@python2_only
534535
@pytest.mark.xfail
535536
def test_install_argparse_shadowed(script):
536537
# When argparse is in the stdlib, we support installing it

0 commit comments

Comments
 (0)