1a9f8e
From 621800d5c65aea36c6a1d9b685ff88f35cfce476 Mon Sep 17 00:00:00 2001
1a9f8e
From: Tomas Orsava <torsava@redhat.com>
1a9f8e
Date: Fri, 15 Nov 2019 19:44:54 +0100
1a9f8e
Subject: [PATCH] Mark 6 tests as network tests
1a9f8e
1a9f8e
=================================== FAILURES ===================================
1a9f8e
_______________________________ test_freeze_path _______________________________
1a9f8e
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path0')
1a9f8e
script = <tests.lib.PipTestEnvironment object at 0x7fe950a4caf0>
1a9f8e
data = <tests.lib.TestData object at 0x7fe950a4cc10>
1a9f8e
    def test_freeze_path(tmpdir, script, data):
1a9f8e
        """
1a9f8e
        Test freeze with --path.
1a9f8e
        """
1a9f8e
>       script.pip('install', '--find-links', data.find_links,
1a9f8e
                   '--target', tmpdir, 'simple==2.0')
1a9f8e
tests/functional/test_freeze.py:712:
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
tests/lib/__init__.py:593: in run
1a9f8e
    _check_stderr(
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
1a9f8e
allow_stderr_warning = False, allow_stderr_error = False
1a9f8e
    def _check_stderr(
1a9f8e
        stderr, allow_stderr_warning, allow_stderr_error,
1a9f8e
    ):
1a9f8e
        """
1a9f8e
        Check the given stderr for logged warnings and errors.
1a9f8e
1a9f8e
        :param stderr: stderr output as a string.
1a9f8e
        :param allow_stderr_warning: whether a logged warning (or deprecation
1a9f8e
            message) is allowed. Must be True if allow_stderr_error is True.
1a9f8e
        :param allow_stderr_error: whether a logged error is allowed.
1a9f8e
        """
1a9f8e
        assert not (allow_stderr_error and not allow_stderr_warning)
1a9f8e
1a9f8e
        lines = stderr.splitlines()
1a9f8e
        for line in lines:
1a9f8e
            # First check for logging errors, which we don't allow during
1a9f8e
            # tests even if allow_stderr_error=True (since a logging error
1a9f8e
            # would signal a bug in pip's code).
1a9f8e
            #    Unlike errors logged with logger.error(), these errors are
1a9f8e
            # sent directly to stderr and so bypass any configured log formatter.
1a9f8e
            # The "--- Logging error ---" string is used in Python 3.4+, and
1a9f8e
            # "Logged from file " is used in Python 2.
1a9f8e
            if (line.startswith('--- Logging error ---') or
1a9f8e
                    line.startswith('Logged from file ')):
1a9f8e
                reason = 'stderr has a logging error, which is never allowed'
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
                raise RuntimeError(msg)
1a9f8e
            if allow_stderr_error:
1a9f8e
                continue
1a9f8e
1a9f8e
            if line.startswith('ERROR: '):
1a9f8e
                reason = (
1a9f8e
                    'stderr has an unexpected error '
1a9f8e
                    '(pass allow_stderr_error=True to permit this)'
1a9f8e
                )
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
                raise RuntimeError(msg)
1a9f8e
            if allow_stderr_warning:
1a9f8e
                continue
1a9f8e
1a9f8e
            if (line.startswith('WARNING: ') or
1a9f8e
                    line.startswith(DEPRECATION_MSG_PREFIX)):
1a9f8e
                reason = (
1a9f8e
                    'stderr has an unexpected warning '
1a9f8e
                    '(pass allow_stderr_warning=True to permit this)'
1a9f8e
                )
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
>               raise RuntimeError(msg)
1a9f8e
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
1a9f8e
E                Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364c850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
1a9f8e
E                Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364c850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364cdc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe64364cf70>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe6435ef130>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe6435ef280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
tests/lib/__init__.py:404: RuntimeError
1a9f8e
________________________ test_freeze_path_exclude_user _________________________
1a9f8e
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_exclude_user0')
1a9f8e
script = <tests.lib.PipTestEnvironment object at 0x7fe950ec8fa0>
1a9f8e
data = <tests.lib.TestData object at 0x7fe950ec8a30>
1a9f8e
    def test_freeze_path_exclude_user(tmpdir, script, data):
1a9f8e
        """
1a9f8e
        Test freeze with --path and make sure packages from --user are not picked
1a9f8e
        up.
1a9f8e
        """
1a9f8e
        script.pip_install_local('--find-links', data.find_links,
1a9f8e
                                 '--user', 'simple2')
1a9f8e
>       script.pip('install', '--find-links', data.find_links,
1a9f8e
                   '--target', tmpdir, 'simple==1.0')
1a9f8e
tests/functional/test_freeze.py:728:
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
tests/lib/__init__.py:593: in run
1a9f8e
    _check_stderr(
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
1a9f8e
allow_stderr_warning = False, allow_stderr_error = False
1a9f8e
    def _check_stderr(
1a9f8e
        stderr, allow_stderr_warning, allow_stderr_error,
1a9f8e
    ):
1a9f8e
        """
1a9f8e
        Check the given stderr for logged warnings and errors.
1a9f8e
1a9f8e
        :param stderr: stderr output as a string.
1a9f8e
        :param allow_stderr_warning: whether a logged warning (or deprecation
1a9f8e
            message) is allowed. Must be True if allow_stderr_error is True.
1a9f8e
        :param allow_stderr_error: whether a logged error is allowed.
1a9f8e
        """
1a9f8e
        assert not (allow_stderr_error and not allow_stderr_warning)
1a9f8e
1a9f8e
        lines = stderr.splitlines()
1a9f8e
        for line in lines:
1a9f8e
            # First check for logging errors, which we don't allow during
1a9f8e
            # tests even if allow_stderr_error=True (since a logging error
1a9f8e
            # would signal a bug in pip's code).
1a9f8e
            #    Unlike errors logged with logger.error(), these errors are
1a9f8e
            # sent directly to stderr and so bypass any configured log formatter.
1a9f8e
            # The "--- Logging error ---" string is used in Python 3.4+, and
1a9f8e
            # "Logged from file " is used in Python 2.
1a9f8e
            if (line.startswith('--- Logging error ---') or
1a9f8e
                    line.startswith('Logged from file ')):
1a9f8e
                reason = 'stderr has a logging error, which is never allowed'
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
                raise RuntimeError(msg)
1a9f8e
            if allow_stderr_error:
1a9f8e
                continue
1a9f8e
1a9f8e
            if line.startswith('ERROR: '):
1a9f8e
                reason = (
1a9f8e
                    'stderr has an unexpected error '
1a9f8e
                    '(pass allow_stderr_error=True to permit this)'
1a9f8e
                )
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
                raise RuntimeError(msg)
1a9f8e
            if allow_stderr_warning:
1a9f8e
                continue
1a9f8e
1a9f8e
            if (line.startswith('WARNING: ') or
1a9f8e
                    line.startswith(DEPRECATION_MSG_PREFIX)):
1a9f8e
                reason = (
1a9f8e
                    'stderr has an unexpected warning '
1a9f8e
                    '(pass allow_stderr_warning=True to permit this)'
1a9f8e
                )
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
>               raise RuntimeError(msg)
1a9f8e
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
1a9f8e
E                Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aa8e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
1a9f8e
E                Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aa8e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7aae50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae751040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae7511c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f87ae751310>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
tests/lib/__init__.py:404: RuntimeError
1a9f8e
__________________________ test_freeze_path_multiple ___________________________
1a9f8e
tmpdir = Path('/tmp/pytest-of-mockbuild/pytest-0/test_freeze_path_multiple0')
1a9f8e
script = <tests.lib.PipTestEnvironment object at 0x7fe950b43fd0>
1a9f8e
data = <tests.lib.TestData object at 0x7fe950b43df0>
1a9f8e
    def test_freeze_path_multiple(tmpdir, script, data):
1a9f8e
        """
1a9f8e
        Test freeze with multiple --path arguments.
1a9f8e
        """
1a9f8e
        path1 = tmpdir / "path1"
1a9f8e
        os.mkdir(path1)
1a9f8e
        path2 = tmpdir / "path2"
1a9f8e
        os.mkdir(path2)
1a9f8e
>       script.pip('install', '--find-links', data.find_links,
1a9f8e
                   '--target', path1, 'simple==2.0')
1a9f8e
tests/functional/test_freeze.py:750:
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
tests/lib/__init__.py:593: in run
1a9f8e
    _check_stderr(
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
stderr = "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'N...t at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/\n"
1a9f8e
allow_stderr_warning = False, allow_stderr_error = False
1a9f8e
    def _check_stderr(
1a9f8e
        stderr, allow_stderr_warning, allow_stderr_error,
1a9f8e
    ):
1a9f8e
        """
1a9f8e
        Check the given stderr for logged warnings and errors.
1a9f8e
1a9f8e
        :param stderr: stderr output as a string.
1a9f8e
        :param allow_stderr_warning: whether a logged warning (or deprecation
1a9f8e
            message) is allowed. Must be True if allow_stderr_error is True.
1a9f8e
        :param allow_stderr_error: whether a logged error is allowed.
1a9f8e
        """
1a9f8e
        assert not (allow_stderr_error and not allow_stderr_warning)
1a9f8e
1a9f8e
        lines = stderr.splitlines()
1a9f8e
        for line in lines:
1a9f8e
            # First check for logging errors, which we don't allow during
1a9f8e
            # tests even if allow_stderr_error=True (since a logging error
1a9f8e
            # would signal a bug in pip's code).
1a9f8e
            #    Unlike errors logged with logger.error(), these errors are
1a9f8e
            # sent directly to stderr and so bypass any configured log formatter.
1a9f8e
            # The "--- Logging error ---" string is used in Python 3.4+, and
1a9f8e
            # "Logged from file " is used in Python 2.
1a9f8e
            if (line.startswith('--- Logging error ---') or
1a9f8e
                    line.startswith('Logged from file ')):
1a9f8e
                reason = 'stderr has a logging error, which is never allowed'
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
                raise RuntimeError(msg)
1a9f8e
            if allow_stderr_error:
1a9f8e
                continue
1a9f8e
1a9f8e
            if line.startswith('ERROR: '):
1a9f8e
                reason = (
1a9f8e
                    'stderr has an unexpected error '
1a9f8e
                    '(pass allow_stderr_error=True to permit this)'
1a9f8e
                )
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
                raise RuntimeError(msg)
1a9f8e
            if allow_stderr_warning:
1a9f8e
                continue
1a9f8e
1a9f8e
            if (line.startswith('WARNING: ') or
1a9f8e
                    line.startswith(DEPRECATION_MSG_PREFIX)):
1a9f8e
                reason = (
1a9f8e
                    'stderr has an unexpected warning '
1a9f8e
                    '(pass allow_stderr_warning=True to permit this)'
1a9f8e
                )
1a9f8e
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
1a9f8e
>               raise RuntimeError(msg)
1a9f8e
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
1a9f8e
E                Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62ae850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/"
1a9f8e
E                Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62ae850>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62aedc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e62aef70>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e6253130>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
E               WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f07e6253280>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/simple/
1a9f8e
tests/lib/__init__.py:404: RuntimeError
1a9f8e
_________________ test_install_no_binary_builds_pep_517_wheel __________________
1a9f8e
script = <tests.lib.PipTestEnvironment object at 0x7fe9509f4e20>
1a9f8e
data = <tests.lib.TestData object at 0x7fe9509f4640>, with_wheel = None
1a9f8e
    def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
1a9f8e
        to_install = data.packages.joinpath('pep517_setup_and_pyproject')
1a9f8e
>       res = script.pip(
1a9f8e
            'install', '--no-binary=:all:', '-f', data.find_links, to_install
1a9f8e
        )
1a9f8e
tests/functional/test_install.py:1279:
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
self = <tests.lib.PipTestEnvironment object at 0x7fe9509f4e20>
1a9f8e
args = ('python', '-m', 'pip', 'install', '--no-binary=:all:', '-f', ...)
1a9f8e
kw = {'expect_stderr': True}
1a9f8e
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/scratch')
1a9f8e
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
1a9f8e
expect_error = None
1a9f8e
    def run(self, *args, **kw):
1a9f8e
        """
1a9f8e
        :param allow_stderr_error: whether a logged error is allowed in
1a9f8e
            stderr.  Passing True for this argument implies
1a9f8e
            `allow_stderr_warning` since warnings are weaker than errors.
1a9f8e
        :param allow_stderr_warning: whether a logged warning (or
1a9f8e
            deprecation message) is allowed in stderr.
1a9f8e
        :param expect_error: if False (the default), asserts that the command
1a9f8e
            exits with 0.  Otherwise, asserts that the command exits with a
1a9f8e
            non-zero exit code.  Passing True also implies allow_stderr_error
1a9f8e
            and allow_stderr_warning.
1a9f8e
        :param expect_stderr: whether to allow warnings in stderr (equivalent
1a9f8e
            to `allow_stderr_warning`).  This argument is an abbreviated
1a9f8e
            version of `allow_stderr_warning` and is also kept for backwards
1a9f8e
            compatibility.
1a9f8e
        """
1a9f8e
        if self.verbose:
1a9f8e
            print('>> running %s %s' % (args, kw))
1a9f8e
1a9f8e
        cwd = kw.pop('cwd', None)
1a9f8e
        run_from = kw.pop('run_from', None)
1a9f8e
        assert not cwd or not run_from, "Don't use run_from; it's going away"
1a9f8e
        cwd = cwd or run_from or self.cwd
1a9f8e
        if sys.platform == 'win32':
1a9f8e
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
1a9f8e
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
1a9f8e
1a9f8e
        # Remove `allow_stderr_error` and `allow_stderr_warning` before
1a9f8e
        # calling run() because PipTestEnvironment doesn't support them.
1a9f8e
        allow_stderr_error = kw.pop('allow_stderr_error', None)
1a9f8e
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)
1a9f8e
1a9f8e
        # Propagate default values.
1a9f8e
        expect_error = kw.get('expect_error')
1a9f8e
        if expect_error:
1a9f8e
            # Then default to allowing logged errors.
1a9f8e
            if allow_stderr_error is not None and not allow_stderr_error:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_error=False with '
1a9f8e
                    'expect_error=True'
1a9f8e
                )
1a9f8e
            allow_stderr_error = True
1a9f8e
1a9f8e
        elif kw.get('expect_stderr'):
1a9f8e
            # Then default to allowing logged warnings.
1a9f8e
            if allow_stderr_warning is not None and not allow_stderr_warning:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_warning=False with '
1a9f8e
                    'expect_stderr=True'
1a9f8e
                )
1a9f8e
            allow_stderr_warning = True
1a9f8e
1a9f8e
        if allow_stderr_error:
1a9f8e
            if allow_stderr_warning is not None and not allow_stderr_warning:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_warning=False with '
1a9f8e
                    'allow_stderr_error=True'
1a9f8e
                )
1a9f8e
1a9f8e
        # Default values if not set.
1a9f8e
        if allow_stderr_error is None:
1a9f8e
            allow_stderr_error = False
1a9f8e
        if allow_stderr_warning is None:
1a9f8e
            allow_stderr_warning = allow_stderr_error
1a9f8e
1a9f8e
        # Pass expect_stderr=True to allow any stderr.  We do this because
1a9f8e
        # we do our checking of stderr further on in check_stderr().
1a9f8e
        kw['expect_stderr'] = True
1a9f8e
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
1a9f8e
E       AssertionError: Script returned code: 1
1a9f8e
tests/lib/__init__.py:586: AssertionError
1a9f8e
----------------------------- Captured stdout call -----------------------------
1a9f8e
Script result: python -m pip install --no-binary=:all: -f file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject
1a9f8e
  return code: 1
1a9f8e
-- stderr: --------------------
1a9f8e
  ERROR: Command errored out with exit status 1:
1a9f8e
   command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools
1a9f8e
       cwd: None
1a9f8e
  Complete output (28 lines):
1a9f8e
  Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages
1a9f8e
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234ef1e50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
1a9f8e
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e92040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
1a9f8e
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e921c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
1a9f8e
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e92340>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
1a9f8e
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7234e924c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
1a9f8e
  Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/setuptools-0.9.6.tar.gz
1a9f8e
      ERROR: Command errored out with exit status 1:
1a9f8e
       command: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"'; __file__='"'"'/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pip-egg-info
1a9f8e
           cwd: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/
1a9f8e
      Complete output (15 lines):
1a9f8e
      Traceback (most recent call last):
1a9f8e
        File "<string>", line 1, in <module>
1a9f8e
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/__init__.py", line 2, in <module>
1a9f8e
          from setuptools.extension import Extension, Library
1a9f8e
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/extension.py", line 5, in <module>
1a9f8e
          from setuptools.dist import _get_unpatched
1a9f8e
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/dist.py", line 7, in <module>
1a9f8e
          from setuptools.command.install import install
1a9f8e
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/__init__.py", line 8, in <module>
1a9f8e
          from setuptools.command import install_scripts
1a9f8e
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/setuptools/command/install_scripts.py", line 3, in <module>
1a9f8e
          from pkg_resources import Distribution, PathMetadata, ensure_directory
1a9f8e
        File "/tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-install-b_6lf4z6/setuptools/pkg_resources.py", line 1545, in <module>
1a9f8e
          register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
1a9f8e
      AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
1a9f8e
      ----------------------------------------
1a9f8e
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
1a9f8e
  ----------------------------------------
1a9f8e
ERROR: Command errored out with exit status 1: /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/workspace/tmp/pip-build-env-ntp1m4dh/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --find-links file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages -- setuptools Check the logs for full command output.
1a9f8e
-- stdout: --------------------
1a9f8e
Looking in links: file:///tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages
1a9f8e
Processing /tmp/pytest-of-mockbuild/pytest-0/test_install_no_binary_builds_0/data/packages/pep517_setup_and_pyproject
1a9f8e
  Installing build dependencies: started
1a9f8e
  Installing build dependencies: finished with status 'error'
1a9f8e
_______________________ test_config_file_override_stack ________________________
1a9f8e
script = <tests.lib.PipTestEnvironment object at 0x7fe950d9b7f0>
1a9f8e
virtualenv = <VirtualEnvironment /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/venv>
1a9f8e
    def test_config_file_override_stack(script, virtualenv):
1a9f8e
        """
1a9f8e
        Test config files (global, overriding a global config with a
1a9f8e
        local, overriding all with a command line flag).
1a9f8e
1a9f8e
        """
1a9f8e
        fd, config_file = tempfile.mkstemp('-pip.cfg', 'test-')
1a9f8e
        try:
1a9f8e
>           _test_config_file_override_stack(script, virtualenv, config_file)
1a9f8e
tests/functional/test_install_config.py:144:
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
tests/functional/test_install_config.py:172: in _test_config_file_override_stack
1a9f8e
    result = script.pip(
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
self = <tests.lib.PipTestEnvironment object at 0x7fe950d9b7f0>
1a9f8e
args = ('python', '-m', 'pip', 'install', '-vvv', '--index-url', ...)
1a9f8e
kw = {'expect_stderr': True}
1a9f8e
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/scratch')
1a9f8e
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
1a9f8e
expect_error = None
1a9f8e
    def run(self, *args, **kw):
1a9f8e
        """
1a9f8e
        :param allow_stderr_error: whether a logged error is allowed in
1a9f8e
            stderr.  Passing True for this argument implies
1a9f8e
            `allow_stderr_warning` since warnings are weaker than errors.
1a9f8e
        :param allow_stderr_warning: whether a logged warning (or
1a9f8e
            deprecation message) is allowed in stderr.
1a9f8e
        :param expect_error: if False (the default), asserts that the command
1a9f8e
            exits with 0.  Otherwise, asserts that the command exits with a
1a9f8e
            non-zero exit code.  Passing True also implies allow_stderr_error
1a9f8e
            and allow_stderr_warning.
1a9f8e
        :param expect_stderr: whether to allow warnings in stderr (equivalent
1a9f8e
            to `allow_stderr_warning`).  This argument is an abbreviated
1a9f8e
            version of `allow_stderr_warning` and is also kept for backwards
1a9f8e
            compatibility.
1a9f8e
        """
1a9f8e
        if self.verbose:
1a9f8e
            print('>> running %s %s' % (args, kw))
1a9f8e
1a9f8e
        cwd = kw.pop('cwd', None)
1a9f8e
        run_from = kw.pop('run_from', None)
1a9f8e
        assert not cwd or not run_from, "Don't use run_from; it's going away"
1a9f8e
        cwd = cwd or run_from or self.cwd
1a9f8e
        if sys.platform == 'win32':
1a9f8e
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
1a9f8e
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
1a9f8e
1a9f8e
        # Remove `allow_stderr_error` and `allow_stderr_warning` before
1a9f8e
        # calling run() because PipTestEnvironment doesn't support them.
1a9f8e
        allow_stderr_error = kw.pop('allow_stderr_error', None)
1a9f8e
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)
1a9f8e
1a9f8e
        # Propagate default values.
1a9f8e
        expect_error = kw.get('expect_error')
1a9f8e
        if expect_error:
1a9f8e
            # Then default to allowing logged errors.
1a9f8e
            if allow_stderr_error is not None and not allow_stderr_error:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_error=False with '
1a9f8e
                    'expect_error=True'
1a9f8e
                )
1a9f8e
            allow_stderr_error = True
1a9f8e
1a9f8e
        elif kw.get('expect_stderr'):
1a9f8e
            # Then default to allowing logged warnings.
1a9f8e
            if allow_stderr_warning is not None and not allow_stderr_warning:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_warning=False with '
1a9f8e
                    'expect_stderr=True'
1a9f8e
                )
1a9f8e
            allow_stderr_warning = True
1a9f8e
1a9f8e
        if allow_stderr_error:
1a9f8e
            if allow_stderr_warning is not None and not allow_stderr_warning:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_warning=False with '
1a9f8e
                    'allow_stderr_error=True'
1a9f8e
                )
1a9f8e
1a9f8e
        # Default values if not set.
1a9f8e
        if allow_stderr_error is None:
1a9f8e
            allow_stderr_error = False
1a9f8e
        if allow_stderr_warning is None:
1a9f8e
            allow_stderr_warning = allow_stderr_error
1a9f8e
1a9f8e
        # Pass expect_stderr=True to allow any stderr.  We do this because
1a9f8e
        # we do our checking of stderr further on in check_stderr().
1a9f8e
        kw['expect_stderr'] = True
1a9f8e
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
1a9f8e
E       AssertionError: Script returned code: 1
1a9f8e
tests/lib/__init__.py:586: AssertionError
1a9f8e
----------------------------- Captured stdout call -----------------------------
1a9f8e
Script result: python -m pip install -vvv --index-url https://pypi.org/simple/ INITools
1a9f8e
  return code: 1
1a9f8e
-- stderr: --------------------
1a9f8e
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3d8b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3da60>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3dbe0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c3dd60>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f966900f490>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
ERROR: Could not find a version that satisfies the requirement INITools (from versions: none)
1a9f8e
ERROR: No matching distribution found for INITools
1a9f8e
-- stdout: --------------------
1a9f8e
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-ephem-wheel-cache-6gj33ens
1a9f8e
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc
1a9f8e
Created requirements tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc'
1a9f8e
Created temporary directory: /tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-install-_91mh3df
1a9f8e
Looking in indexes: https://pypi.org/simple/
1a9f8e
1 location(s) to search for versions of INITools:
1a9f8e
* https://pypi.org/simple/initools/
1a9f8e
Getting page https://pypi.org/simple/initools/
1a9f8e
Found index url https://pypi.org/simple/
1a9f8e
Looking up "https://pypi.org/simple/initools/" in the cache
1a9f8e
Request header has "max_age" as 0, cache bypassed
1a9f8e
Starting new HTTPS connection (1): pypi.org:443
1a9f8e
Incremented Retry for (url='/simple/initools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
1a9f8e
Starting new HTTPS connection (2): pypi.org:443
1a9f8e
Incremented Retry for (url='/simple/initools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
1a9f8e
Starting new HTTPS connection (3): pypi.org:443
1a9f8e
Incremented Retry for (url='/simple/initools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
1a9f8e
Starting new HTTPS connection (4): pypi.org:443
1a9f8e
Incremented Retry for (url='/simple/initools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
1a9f8e
Starting new HTTPS connection (5): pypi.org:443
1a9f8e
Incremented Retry for (url='/simple/initools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
1a9f8e
Starting new HTTPS connection (6): pypi.org:443
1a9f8e
Could not fetch URL https://pypi.org/simple/initools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/initools/ (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f9669c15b50>: Failed to establish a new connection: [Errno -2] Name or service not known')) - skipping
1a9f8e
Given no hashes to check 0 links for project 'INITools': discarding no candidates
1a9f8e
Cleaning up...
1a9f8e
Removed build tracker '/tmp/pytest-of-mockbuild/pytest-0/test_config_file_override_stac0/workspace/tmp/pip-req-tracker-s7_2cwgc'
1a9f8e
Exception information:
1a9f8e
Traceback (most recent call last):
1a9f8e
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
1a9f8e
    status = self.run(options, args)
1a9f8e
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 401, in run
1a9f8e
    resolver.resolve(requirement_set)
1a9f8e
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 202, in resolve
1a9f8e
    self._resolve_one(requirement_set, req)
1a9f8e
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 368, in _resolve_one
1a9f8e
    abstract_dist = self._get_abstract_dist_for(req_to_install)
1a9f8e
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 314, in _get_abstract_dist_for
1a9f8e
    req.populate_link(self.finder, upgrade_allowed, self.require_hashes)
1a9f8e
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 226, in populate_link
1a9f8e
    self.link = finder.find_requirement(self, upgrade)
1a9f8e
  File "/builddir/build/BUILDROOT/python-pip-19.3.1-1.fc32.noarch/usr/lib/python3.8/site-packages/pip/_internal/index.py", line 905, in find_requirement
1a9f8e
    raise DistributionNotFound(
1a9f8e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for INITools
1a9f8e
_______________________ test_no_upgrade_unless_requested _______________________
1a9f8e
script = <tests.lib.PipTestEnvironment object at 0x7fe950d86070>
1a9f8e
    def test_no_upgrade_unless_requested(script):
1a9f8e
        """
1a9f8e
        No upgrade if not specifically requested.
1a9f8e
1a9f8e
        """
1a9f8e
>       script.pip('install', 'INITools==0.1')
1a9f8e
tests/functional/test_install_upgrade.py:16:
1a9f8e
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1a9f8e
self = <tests.lib.PipTestEnvironment object at 0x7fe950d86070>
1a9f8e
args = ('python', '-m', 'pip', 'install', 'INITools==0.1')
1a9f8e
kw = {'expect_stderr': True}
1a9f8e
cwd = Path('/tmp/pytest-of-mockbuild/pytest-0/test_no_upgrade_unless_request0/workspace/scratch')
1a9f8e
run_from = None, allow_stderr_error = False, allow_stderr_warning = False
1a9f8e
expect_error = None
1a9f8e
    def run(self, *args, **kw):
1a9f8e
        """
1a9f8e
        :param allow_stderr_error: whether a logged error is allowed in
1a9f8e
            stderr.  Passing True for this argument implies
1a9f8e
            `allow_stderr_warning` since warnings are weaker than errors.
1a9f8e
        :param allow_stderr_warning: whether a logged warning (or
1a9f8e
            deprecation message) is allowed in stderr.
1a9f8e
        :param expect_error: if False (the default), asserts that the command
1a9f8e
            exits with 0.  Otherwise, asserts that the command exits with a
1a9f8e
            non-zero exit code.  Passing True also implies allow_stderr_error
1a9f8e
            and allow_stderr_warning.
1a9f8e
        :param expect_stderr: whether to allow warnings in stderr (equivalent
1a9f8e
            to `allow_stderr_warning`).  This argument is an abbreviated
1a9f8e
            version of `allow_stderr_warning` and is also kept for backwards
1a9f8e
            compatibility.
1a9f8e
        """
1a9f8e
        if self.verbose:
1a9f8e
            print('>> running %s %s' % (args, kw))
1a9f8e
1a9f8e
        cwd = kw.pop('cwd', None)
1a9f8e
        run_from = kw.pop('run_from', None)
1a9f8e
        assert not cwd or not run_from, "Don't use run_from; it's going away"
1a9f8e
        cwd = cwd or run_from or self.cwd
1a9f8e
        if sys.platform == 'win32':
1a9f8e
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
1a9f8e
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
1a9f8e
1a9f8e
        # Remove `allow_stderr_error` and `allow_stderr_warning` before
1a9f8e
        # calling run() because PipTestEnvironment doesn't support them.
1a9f8e
        allow_stderr_error = kw.pop('allow_stderr_error', None)
1a9f8e
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)
1a9f8e
1a9f8e
        # Propagate default values.
1a9f8e
        expect_error = kw.get('expect_error')
1a9f8e
        if expect_error:
1a9f8e
            # Then default to allowing logged errors.
1a9f8e
            if allow_stderr_error is not None and not allow_stderr_error:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_error=False with '
1a9f8e
                    'expect_error=True'
1a9f8e
                )
1a9f8e
            allow_stderr_error = True
1a9f8e
1a9f8e
        elif kw.get('expect_stderr'):
1a9f8e
            # Then default to allowing logged warnings.
1a9f8e
            if allow_stderr_warning is not None and not allow_stderr_warning:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_warning=False with '
1a9f8e
                    'expect_stderr=True'
1a9f8e
                )
1a9f8e
            allow_stderr_warning = True
1a9f8e
1a9f8e
        if allow_stderr_error:
1a9f8e
            if allow_stderr_warning is not None and not allow_stderr_warning:
1a9f8e
                raise RuntimeError(
1a9f8e
                    'cannot pass allow_stderr_warning=False with '
1a9f8e
                    'allow_stderr_error=True'
1a9f8e
                )
1a9f8e
1a9f8e
        # Default values if not set.
1a9f8e
        if allow_stderr_error is None:
1a9f8e
            allow_stderr_error = False
1a9f8e
        if allow_stderr_warning is None:
1a9f8e
            allow_stderr_warning = allow_stderr_error
1a9f8e
1a9f8e
        # Pass expect_stderr=True to allow any stderr.  We do this because
1a9f8e
        # we do our checking of stderr further on in check_stderr().
1a9f8e
        kw['expect_stderr'] = True
1a9f8e
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
1a9f8e
E       AssertionError: Script returned code: 1
1a9f8e
tests/lib/__init__.py:586: AssertionError
1a9f8e
----------------------------- Captured stdout call -----------------------------
1a9f8e
Script result: python -m pip install INITools==0.1
1a9f8e
  return code: 1
1a9f8e
-- stderr: --------------------
1a9f8e
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36700>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36c40>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36dc0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66cc36f40>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd66be48100>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/initools/
1a9f8e
ERROR: Could not find a version that satisfies the requirement INITools==0.1 (from versions: none)
1a9f8e
ERROR: No matching distribution found for INITools==0.1
1a9f8e
---
1a9f8e
 tests/functional/test_freeze.py          | 3 +++
1a9f8e
 tests/functional/test_install.py         | 1 +
1a9f8e
 tests/functional/test_install_config.py  | 1 +
1a9f8e
 tests/functional/test_install_upgrade.py | 1 +
1a9f8e
 4 files changed, 6 insertions(+)
1a9f8e
1a9f8e
diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py
1a9f8e
index 546a482..aabb0ca 100644
1a9f8e
--- a/tests/functional/test_freeze.py
1a9f8e
+++ b/tests/functional/test_freeze.py
1a9f8e
@@ -705,6 +705,7 @@ def test_freeze_user(script, virtualenv, data):
1a9f8e
     assert 'simple2' not in result.stdout
1a9f8e
 
1a9f8e
 
1a9f8e
+@pytest.mark.network
1a9f8e
 def test_freeze_path(tmpdir, script, data):
1a9f8e
     """
1a9f8e
     Test freeze with --path.
1a9f8e
@@ -718,6 +719,7 @@ def test_freeze_path(tmpdir, script, data):
1a9f8e
     _check_output(result.stdout, expected)
1a9f8e
 
1a9f8e
 
1a9f8e
+@pytest.mark.network
1a9f8e
 def test_freeze_path_exclude_user(tmpdir, script, data):
1a9f8e
     """
1a9f8e
     Test freeze with --path and make sure packages from --user are not picked
1a9f8e
@@ -739,6 +741,7 @@ def test_freeze_path_exclude_user(tmpdir, script, data):
1a9f8e
     _check_output(result.stdout, expected)
1a9f8e
 
1a9f8e
 
1a9f8e
+@pytest.mark.network
1a9f8e
 def test_freeze_path_multiple(tmpdir, script, data):
1a9f8e
     """
1a9f8e
     Test freeze with multiple --path arguments.
1a9f8e
diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py
1a9f8e
index 0bea054..b816df6 100644
1a9f8e
--- a/tests/functional/test_install.py
1a9f8e
+++ b/tests/functional/test_install.py
1a9f8e
@@ -1274,6 +1274,7 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel):
1a9f8e
     assert "Running setup.py install for upper" in str(res), str(res)
1a9f8e
 
1a9f8e
 
1a9f8e
+@pytest.mark.network
1a9f8e
 def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
1a9f8e
     to_install = data.packages.joinpath('pep517_setup_and_pyproject')
1a9f8e
     res = script.pip(
1a9f8e
diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py
1a9f8e
index bcf83f1..c9c60a2 100644
1a9f8e
--- a/tests/functional/test_install_config.py
1a9f8e
+++ b/tests/functional/test_install_config.py
1a9f8e
@@ -133,6 +133,7 @@ def test_command_line_appends_correctly(script, data):
1a9f8e
     ), 'stdout: {}'.format(result.stdout)
1a9f8e
 
1a9f8e
 
1a9f8e
+@pytest.mark.network
1a9f8e
 def test_config_file_override_stack(script, virtualenv):
1a9f8e
     """
1a9f8e
     Test config files (global, overriding a global config with a
1a9f8e
diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py
1a9f8e
index 36b518b..c34a961 100644
1a9f8e
--- a/tests/functional/test_install_upgrade.py
1a9f8e
+++ b/tests/functional/test_install_upgrade.py
1a9f8e
@@ -8,6 +8,7 @@ from tests.lib import assert_all_changes, pyversion
1a9f8e
 from tests.lib.local_repos import local_checkout
1a9f8e
 
1a9f8e
 
1a9f8e
+@pytest.mark.network
1a9f8e
 def test_no_upgrade_unless_requested(script):
1a9f8e
     """
1a9f8e
     No upgrade if not specifically requested.
1a9f8e
-- 
1a9f8e
2.20.1
1a9f8e