Skip to content

Instantly share code, notes, and snippets.

@vharsh
Created October 14, 2019 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vharsh/d03bcfd669cc4727a77f59941c9f0520 to your computer and use it in GitHub Desktop.
Save vharsh/d03bcfd669cc4727a77f59941c9f0520 to your computer and use it in GitHub Desktop.
Python_pip tox test run
└─ $ ▶ tox -e py36 -- -n auto
GLOB sdist-make: /home/harsh/code/py/pypa/pip/setup.py
py36 inst-nodeps: /home/harsh/code/py/pypa/pip/.tox/.tmp/package/1/pip-19.3.dev0.zip
py36 installed: WARNING: Could not generate requirement for distribution -ip 19.3.dev0 (/home/harsh/code/py/pypa/pip/.tox/py36/lib/python3.6/site-packages): Parse error at "'-ip==19.'": Expected W:(abcd...),apipkg==1.5,atomicwrites==1.3.0,attrs==19.2.0,coverage==4.5.4,execnet==1.7.1,freezegun==0.3.12,importlib-metadata==0.23,mock==3.0.5,more-itertools==7.2.0,pip==19.3.dev0,pluggy==0.13.0,pretend==1.0.9,py==1.8.0,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.1,pytest-rerunfailures==6.0,pytest-timeout==1.3.3,pytest-xdist==1.27.0,python-dateutil==2.8.0,PyYAML==5.1.2,scripttest==1.3,setuptools==41.2.0,six==1.12.0,virtualenv==16.7.5,wheel==0.33.6,zipp==0.6.0
py36 run-test-pre: PYTHONHASHSEED='3832830226'
py36 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /home/harsh/code/py/pypa/pip/tests/data/common_wheels
py36 run-test-pre: commands[1] | python /home/harsh/code/py/pypa/pip/tools/tox_pip.py wheel -w /home/harsh/code/py/pypa/pip/tests/data/common_wheels -r /home/harsh/code/py/pypa/pip/tools/requirements/tests-common_wheels.txt
Collecting setuptools>=40.8.0 (from -r tools/requirements/tests-common_wheels.txt (line 8))
Using cached https://files.pythonhosted.org/packages/6a/9a/50fadfd53ec909e4399b67c74cc7f4e883488035cfcdb90b685758fa8b34/setuptools-41.4.0-py2.py3-none-any.whl
Saved ./tests/data/common_wheels/setuptools-41.4.0-py2.py3-none-any.whl
Collecting wheel (from -r tools/requirements/tests-common_wheels.txt (line 9))
Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Saved ./tests/data/common_wheels/wheel-0.33.6-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py36 run-test: commands[0] | pytest --timeout 300 -n auto
============================================================ test session starts =============================================================
platform linux -- Python 3.6.8, pytest-3.8.2, py-1.8.0, pluggy-0.13.0
rootdir: /home/harsh/code/py/pypa/pip, inifile: setup.cfg
plugins: cov-2.8.1, xdist-1.27.0, timeout-1.3.3, forked-1.1.1, rerunfailures-6.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
gw0 [1654] / gw1 [1654] / gw2 [1654] / gw3 [1654]
................................s..........................s......................ss....x...........s................................. [ 8%]
...s..s......s....ss......s...........s.........s......s.................ss......ss....................................x...ss..s...... [ 16%]
............s............sF...................................................F..........................................s............ [ 24%]
...................................................................................................................................... [ 32%]
...................................................................................................................................... [ 40%]
...................................................................................................................................... [ 48%]
................................................sss................................................................................... [ 56%]
................................................s........s............................................................................ [ 64%]
.......................................................................................................................ss............. [ 72%]
............................................s...................................................................s..................... [ 81%]
........s............................................................................................................................. [ 89%]
...........................s..s.........................xx.......x.................................................................... [ 97%]
.........F.s.........F.sss.................... [100%]
================================================================== FAILURES ==================================================================
__________________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite ___________________________________________
[gw0] linux -- Python 3.6.8 /home/harsh/code/py/pypa/pip/.tox/py36/bin/python
self = <tests.functional.test_install_user.Tests_UserSite object at 0x7f2638acd080>
virtualenv = <VirtualEnvironment /tmp/pytest-of-harsh/pytest-11/popen-gw0/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x7f2638acd710>
@pytest.mark.network
def test_install_user_conflict_in_globalsite(self, virtualenv, script):
"""
Test user install with conflict in global site ignores site and
installs to usersite
"""
_patch_dist_in_site_packages(virtualenv)
script.pip('install', 'INITools==0.2', '--no-binary=:all:')
result2 = script.pip(
> 'install', '--user', 'INITools==0.1', '--no-binary=:all:')
tests/functional/test_install_user.py:133:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.lib.PipTestEnvironment object at 0x7f2638acd710>, args = ('python', '-m', 'pip', 'install', '--user', 'INITools==0.1', ...)
kw = {'expect_stderr': True}, cwd = Path('/tmp/pytest-of-harsh/pytest-11/popen-gw0/test_install_user_conflict_in_0/workspace/scratch')
run_from = None, allow_stderr_error = False, allow_stderr_warning = False, expect_error = None
def run(self, *args, **kw):
"""
:param allow_stderr_error: whether a logged error is allowed in
stderr. Passing True for this argument implies
`allow_stderr_warning` since warnings are weaker than errors.
:param allow_stderr_warning: whether a logged warning (or
deprecation message) is allowed in stderr.
:param expect_error: if False (the default), asserts that the command
exits with 0. Otherwise, asserts that the command exits with a
non-zero exit code. Passing True also implies allow_stderr_error
and allow_stderr_warning.
:param expect_stderr: whether to allow warnings in stderr (equivalent
to `allow_stderr_warning`). This argument is an abbreviated
version of `allow_stderr_warning` and is also kept for backwards
compatibility.
"""
if self.verbose:
print('>> running %s %s' % (args, kw))
cwd = kw.pop('cwd', None)
run_from = kw.pop('run_from', None)
assert not cwd or not run_from, "Don't use run_from; it's going away"
cwd = cwd or run_from or self.cwd
if sys.platform == 'win32':
# Partial fix for ScriptTest.run using `shell=True` on Windows.
args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
# Remove `allow_stderr_error` and `allow_stderr_warning` before
# calling run() because PipTestEnvironment doesn't support them.
allow_stderr_error = kw.pop('allow_stderr_error', None)
allow_stderr_warning = kw.pop('allow_stderr_warning', None)
# Propagate default values.
expect_error = kw.get('expect_error')
if expect_error:
# Then default to allowing logged errors.
if allow_stderr_error is not None and not allow_stderr_error:
raise RuntimeError(
'cannot pass allow_stderr_error=False with '
'expect_error=True'
)
allow_stderr_error = True
elif kw.get('expect_stderr'):
# Then default to allowing logged warnings.
if allow_stderr_warning is not None and not allow_stderr_warning:
raise RuntimeError(
'cannot pass allow_stderr_warning=False with '
'expect_stderr=True'
)
allow_stderr_warning = True
if allow_stderr_error:
if allow_stderr_warning is not None and not allow_stderr_warning:
raise RuntimeError(
'cannot pass allow_stderr_warning=False with '
'allow_stderr_error=True'
)
# Default values if not set.
if allow_stderr_error is None:
allow_stderr_error = False
if allow_stderr_warning is None:
allow_stderr_warning = allow_stderr_error
# Pass expect_stderr=True to allow any stderr. We do this because
# we do our checking of stderr further on in check_stderr().
kw['expect_stderr'] = True
> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E AssertionError: Script returned code: 1
tests/lib/__init__.py:586: AssertionError
------------------------------------------------------------ Captured stdout call ------------------------------------------------------------
Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
return code: 1
-- stderr: --------------------
ERROR: Will not install to the user site because it will lack sys.path precedence to INITools in /tmp/pytest-of-harsh/pytest-11/popen-gw0/test_install_user_conflict_in_0/workspace/venv/lib/python3.6/site-packages
____________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite_and_usersite ____________________________________
[gw2] linux -- Python 3.6.8 /home/harsh/code/py/pypa/pip/.tox/py36/bin/python
self = <tests.functional.test_install_user.Tests_UserSite object at 0x7f8df1b51978>
virtualenv = <VirtualEnvironment /tmp/pytest-of-harsh/pytest-11/popen-gw2/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x7f8df0566780>
@pytest.mark.network
def test_install_user_conflict_in_globalsite_and_usersite(
self, virtualenv, script):
"""
Test user install with conflict in globalsite and usersite ignores
global site and updates usersite.
"""
_patch_dist_in_site_packages(virtualenv)
script.pip('install', 'INITools==0.2', '--no-binary=:all:')
> script.pip('install', '--user', 'INITools==0.3', '--no-binary=:all:')
tests/functional/test_install_user.py:191:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.lib.PipTestEnvironment object at 0x7f8df0566780>, args = ('python', '-m', 'pip', 'install', '--user', 'INITools==0.3', ...)
kw = {'expect_stderr': True}, cwd = Path('/tmp/pytest-of-harsh/pytest-11/popen-gw2/test_install_user_conflict_in_0/workspace/scratch')
run_from = None, allow_stderr_error = False, allow_stderr_warning = False, expect_error = None
def run(self, *args, **kw):
"""
:param allow_stderr_error: whether a logged error is allowed in
stderr. Passing True for this argument implies
`allow_stderr_warning` since warnings are weaker than errors.
:param allow_stderr_warning: whether a logged warning (or
deprecation message) is allowed in stderr.
:param expect_error: if False (the default), asserts that the command
exits with 0. Otherwise, asserts that the command exits with a
non-zero exit code. Passing True also implies allow_stderr_error
and allow_stderr_warning.
:param expect_stderr: whether to allow warnings in stderr (equivalent
to `allow_stderr_warning`). This argument is an abbreviated
version of `allow_stderr_warning` and is also kept for backwards
compatibility.
"""
if self.verbose:
print('>> running %s %s' % (args, kw))
cwd = kw.pop('cwd', None)
run_from = kw.pop('run_from', None)
assert not cwd or not run_from, "Don't use run_from; it's going away"
cwd = cwd or run_from or self.cwd
if sys.platform == 'win32':
# Partial fix for ScriptTest.run using `shell=True` on Windows.
args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
# Remove `allow_stderr_error` and `allow_stderr_warning` before
# calling run() because PipTestEnvironment doesn't support them.
allow_stderr_error = kw.pop('allow_stderr_error', None)
allow_stderr_warning = kw.pop('allow_stderr_warning', None)
# Propagate default values.
expect_error = kw.get('expect_error')
if expect_error:
# Then default to allowing logged errors.
if allow_stderr_error is not None and not allow_stderr_error:
raise RuntimeError(
'cannot pass allow_stderr_error=False with '
'expect_error=True'
)
allow_stderr_error = True
elif kw.get('expect_stderr'):
# Then default to allowing logged warnings.
if allow_stderr_warning is not None and not allow_stderr_warning:
raise RuntimeError(
'cannot pass allow_stderr_warning=False with '
'expect_stderr=True'
)
allow_stderr_warning = True
if allow_stderr_error:
if allow_stderr_warning is not None and not allow_stderr_warning:
raise RuntimeError(
'cannot pass allow_stderr_warning=False with '
'allow_stderr_error=True'
)
# Default values if not set.
if allow_stderr_error is None:
allow_stderr_error = False
if allow_stderr_warning is None:
allow_stderr_warning = allow_stderr_error
# Pass expect_stderr=True to allow any stderr. We do this because
# we do our checking of stderr further on in check_stderr().
kw['expect_stderr'] = True
> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E AssertionError: Script returned code: 1
tests/lib/__init__.py:586: AssertionError
------------------------------------------------------------ Captured stdout call ------------------------------------------------------------
Script result: python -m pip install --user INITools==0.3 --no-binary=:all:
return code: 1
-- stderr: --------------------
ERROR: Will not install to the user site because it will lack sys.path precedence to INITools in /tmp/pytest-of-harsh/pytest-11/popen-gw2/test_install_user_conflict_in_0/workspace/venv/lib/python3.6/site-packages
______________________________________________________ test_uninstall_editable_from_svn ______________________________________________________
[gw3] linux -- Python 3.6.8 /home/harsh/code/py/pypa/pip/.tox/py36/bin/python
script = <tests.lib.PipTestEnvironment object at 0x7f5708703240>
tmpdir = Path('/tmp/pytest-of-harsh/pytest-11/popen-gw3/test_uninstall_editable_from_s0')
@pytest.mark.network
def test_uninstall_editable_from_svn(script, tmpdir):
"""
Test uninstalling an editable installation from svn.
"""
result = script.pip(
'install', '-e',
'%s#egg=initools' % (
> local_checkout('svn+http://svn.colorstudy.com/INITools', tmpdir)
),
)
tests/functional/test_uninstall.py:303:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/local_repos.py:63: in local_checkout
_create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/usr/lib/python3.6/subprocess.py:306: in check_call
retcode = call(*popenargs, **kwargs)
/usr/lib/python3.6/subprocess.py:287: in call
with Popen(*popenargs, **kwargs) as p:
/usr/lib/python3.6/subprocess.py:729: in __init__
restore_signals, start_new_session)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <subprocess.Popen object at 0x7f57086b3160>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None
close_fds = True, pass_fds = (), cwd = '/tmp/pytest-of-harsh/pytest-11/popen-gw3/test_uninstall_editable_from_s0/cache', env = None
startupinfo = None, creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1
restore_signals = True, start_new_session = False
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite,
restore_signals, start_new_session):
"""Execute program (POSIX version)"""
if isinstance(args, (str, bytes)):
args = [args]
else:
args = list(args)
if shell:
args = ["/bin/sh", "-c"] + args
if executable:
args[0] = executable
if executable is None:
executable = args[0]
orig_executable = executable
# For transferring possible exec failure from child to parent.
# Data format: "exception name:hex errno:description"
# Pickle is not used; it is complex and involves memory allocation.
errpipe_read, errpipe_write = os.pipe()
# errpipe_write must not be in the standard io 0, 1, or 2 fd range.
low_fds_to_close = []
while errpipe_write < 3:
low_fds_to_close.append(errpipe_write)
errpipe_write = os.dup(errpipe_write)
for low_fd in low_fds_to_close:
os.close(low_fd)
try:
try:
# We must avoid complex work that could involve
# malloc or free in the child process to avoid
# potential deadlocks, thus we do all this here.
# and pass it to fork_exec()
if env is not None:
env_list = []
for k, v in env.items():
k = os.fsencode(k)
if b'=' in k:
raise ValueError("illegal environment variable name")
env_list.append(k + b'=' + os.fsencode(v))
else:
env_list = None # Use execv instead of execve.
executable = os.fsencode(executable)
if os.path.dirname(executable):
executable_list = (executable,)
else:
# This matches the behavior of os._execvpe().
executable_list = tuple(
os.path.join(os.fsencode(dir), executable)
for dir in os.get_exec_path(env))
fds_to_keep = set(pass_fds)
fds_to_keep.add(errpipe_write)
self.pid = _posixsubprocess.fork_exec(
args, executable_list,
close_fds, tuple(sorted(map(int, fds_to_keep))),
cwd, env_list,
p2cread, p2cwrite, c2pread, c2pwrite,
errread, errwrite,
errpipe_read, errpipe_write,
restore_signals, start_new_session, preexec_fn)
self._child_created = True
finally:
# be sure the FD is closed no matter what
os.close(errpipe_write)
# self._devnull is not always defined.
devnull_fd = getattr(self, '_devnull', None)
if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd:
os.close(p2cread)
if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd:
os.close(c2pwrite)
if errwrite != -1 and errread != -1 and errwrite != devnull_fd:
os.close(errwrite)
if devnull_fd is not None:
os.close(devnull_fd)
# Prevent a double close of these fds from __init__ on error.
self._closed_child_pipe_fds = True
# Wait for exec to fail or succeed; possibly raising an
# exception (limited in size)
errpipe_data = bytearray()
while True:
part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
finally:
# be sure the FD is closed no matter what
os.close(errpipe_read)
if errpipe_data:
try:
pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid:
self._handle_exitstatus(sts)
else:
self.returncode = sys.maxsize
except ChildProcessError:
pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
# The encoding here should match the encoding
# written in by the subprocess implementations
# like _posixsubprocess
err_msg = err_msg.decode()
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = 'Bad exception data from child: {!r}'.format(
bytes(errpipe_data))
child_exception_type = getattr(
builtins, exception_name.decode('ascii'),
SubprocessError)
if issubclass(child_exception_type, OSError) and hex_errno:
errno_num = int(hex_errno, 16)
child_exec_never_called = (err_msg == "noexec")
if child_exec_never_called:
err_msg = ""
# The error must be from chdir(cwd).
err_filename = cwd
else:
err_filename = orig_executable
if errno_num != 0:
err_msg = os.strerror(errno_num)
if errno_num == errno.ENOENT:
err_msg += ': ' + repr(err_filename)
> raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin': 'svnadmin'
/usr/lib/python3.6/subprocess.py:1364: FileNotFoundError
_______________________________ Tests_UninstallUserSite.test_uninstall_from_usersite_with_dist_in_global_site ________________________________
[gw3] linux -- Python 3.6.8 /home/harsh/code/py/pypa/pip/.tox/py36/bin/python
self = <tests.functional.test_uninstall_user.Tests_UninstallUserSite object at 0x7f5708666e48>
virtualenv = <VirtualEnvironment /tmp/pytest-of-harsh/pytest-11/popen-gw3/test_uninstall_from_usersite_w0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x7f570855cf60>
def test_uninstall_from_usersite_with_dist_in_global_site(
self, virtualenv, script):
"""
Test uninstall from usersite (with same dist in global site)
"""
_patch_dist_in_site_packages(virtualenv)
script.pip_install_local('pip-test-package==0.1', '--no-binary=:all:')
result2 = script.pip_install_local(
> '--user', 'pip-test-package==0.1.1', '--no-binary=:all:')
tests/functional/test_uninstall_user.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/__init__.py:615: in pip_install_local
*args, **kwargs
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tests.lib.PipTestEnvironment object at 0x7f570855cf60>, args = ('python', '-m', 'pip', 'install', '--no-index', '--find-links', ...)
kw = {'expect_stderr': True}, cwd = Path('/tmp/pytest-of-harsh/pytest-11/popen-gw3/test_uninstall_from_usersite_w0/workspace/scratch')
run_from = None, allow_stderr_error = False, allow_stderr_warning = False, expect_error = None
def run(self, *args, **kw):
"""
:param allow_stderr_error: whether a logged error is allowed in
stderr. Passing True for this argument implies
`allow_stderr_warning` since warnings are weaker than errors.
:param allow_stderr_warning: whether a logged warning (or
deprecation message) is allowed in stderr.
:param expect_error: if False (the default), asserts that the command
exits with 0. Otherwise, asserts that the command exits with a
non-zero exit code. Passing True also implies allow_stderr_error
and allow_stderr_warning.
:param expect_stderr: whether to allow warnings in stderr (equivalent
to `allow_stderr_warning`). This argument is an abbreviated
version of `allow_stderr_warning` and is also kept for backwards
compatibility.
"""
if self.verbose:
print('>> running %s %s' % (args, kw))
cwd = kw.pop('cwd', None)
run_from = kw.pop('run_from', None)
assert not cwd or not run_from, "Don't use run_from; it's going away"
cwd = cwd or run_from or self.cwd
if sys.platform == 'win32':
# Partial fix for ScriptTest.run using `shell=True` on Windows.
args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
# Remove `allow_stderr_error` and `allow_stderr_warning` before
# calling run() because PipTestEnvironment doesn't support them.
allow_stderr_error = kw.pop('allow_stderr_error', None)
allow_stderr_warning = kw.pop('allow_stderr_warning', None)
# Propagate default values.
expect_error = kw.get('expect_error')
if expect_error:
# Then default to allowing logged errors.
if allow_stderr_error is not None and not allow_stderr_error:
raise RuntimeError(
'cannot pass allow_stderr_error=False with '
'expect_error=True'
)
allow_stderr_error = True
elif kw.get('expect_stderr'):
# Then default to allowing logged warnings.
if allow_stderr_warning is not None and not allow_stderr_warning:
raise RuntimeError(
'cannot pass allow_stderr_warning=False with '
'expect_stderr=True'
)
allow_stderr_warning = True
if allow_stderr_error:
if allow_stderr_warning is not None and not allow_stderr_warning:
raise RuntimeError(
'cannot pass allow_stderr_warning=False with '
'allow_stderr_error=True'
)
# Default values if not set.
if allow_stderr_error is None:
allow_stderr_error = False
if allow_stderr_warning is None:
allow_stderr_warning = allow_stderr_error
# Pass expect_stderr=True to allow any stderr. We do this because
# we do our checking of stderr further on in check_stderr().
kw['expect_stderr'] = True
> result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E AssertionError: Script returned code: 1
tests/lib/__init__.py:586: AssertionError
------------------------------------------------------------ Captured stdout call ------------------------------------------------------------
Script result: python -m pip install --no-index --find-links file:///home/harsh/code/py/pypa/pip/tests/data/packages --user pip-test-package==0.1.1 --no-binary=:all:
return code: 1
-- stderr: --------------------
ERROR: Will not install to the user site because it will lack sys.path precedence to pip-test-package in /tmp/pytest-of-harsh/pytest-11/popen-gw3/test_uninstall_from_usersite_w0/workspace/venv/lib/python3.6/site-packages
-- stdout: --------------------
Looking in links: file:///home/harsh/code/py/pypa/pip/tests/data/packages
========================================================== short test summary info ===========================================================
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite_and_usersite
FAIL tests/functional/test_uninstall.py::test_uninstall_editable_from_svn
FAIL tests/functional/test_uninstall_user.py::Tests_UninstallUserSite::()::test_uninstall_from_usersite_with_dist_in_global_site
SKIP [1] tests/functional/test_configuration.py:19: Can't modify underlying file for any mode
SKIP [1] tests/functional/test_freeze.py:462: Bazaar is not available
SKIP [1] tests/functional/test_freeze.py:173: Subversion is not available
SKIP [1] tests/functional/test_freeze.py:327: Mercurial is not available
SKIP [1] tests/functional/test_install.py:337: Mercurial is not available
SKIP [1] tests/functional/test_install.py:348: Mercurial is not available
SKIP [1] tests/functional/test_freeze.py:420: Mercurial is not available
SKIP [1] tests/functional/test_install.py:359: Bazaar is not available
SKIP [6] tests/functional/test_install.py:1571: condition: sys.platform != 'win32'
SKIP [1] tests/functional/test_install.py:1620: condition: sys.platform != 'win32'
SKIP [1] tests/functional/test_install.py:574: Python 2 only
SKIP [1] tests/functional/test_install.py:672: Mercurial is not available
SKIP [1] tests/functional/test_install.py:255: Subversion is not available
SKIP [1] tests/functional/test_install.py:368: Bazaar is not available
SKIP [1] tests/functional/test_install.py:1596: condition: sys.platform != 'win32'
SKIP [1] tests/functional/test_install_cleanup.py:39: Mercurial is not available
SKIP [1] tests/functional/test_install_reqs.py:103: Subversion is not available
SKIP [1] tests/functional/test_install_user.py:43: Subversion is not available
SKIP [1] tests/unit/test_collector.py:194: condition: sys.platform != 'win32'
SKIP [3] tests/unit/test_req.py:686: Test only available on Windows
SKIP [1] tests/unit/test_urls.py:27: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_urls.py:59: condition: sys.platform != 'win32'
SKIP [2] tests/unit/test_utils_subprocess.py:105: condition: sys.version_info >= (3,)
SKIP [1] tests/unit/test_vcs.py:24: Subversion is only required under Travis
SKIP [1] tests/unit/test_vcs.py:414: Subversion is not available
SKIP [1] tests/unit/test_vcs_mercurial.py:14: Mercurial is not available
SKIP [1] tests/functional/test_requests.py:4: <Skipped instance>
SKIP [1] tests/functional/test_search.py:81: Warehouse search behavior is different and no longer returns multiple results. See https://github.com/pypa/warehouse/issues/3717 for more information.
SKIP [1] tests/functional/test_uninstall.py:358: Subversion is not available
SKIP [1] tests/functional/test_vcs_bazaar.py:20: Bazaar is only required under Travis
SKIP [1] tests/functional/test_vcs_bazaar.py:28: Bazaar is not available
SKIP [1] tests/functional/test_vcs_bazaar.py:45: Bazaar is not available
XFAIL tests/functional/test_freeze.py::test_freeze_exclude_editable
XFAIL tests/functional/test_install_reqs.py::test_install_distribution_union_conflicting_extras
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_triangle]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_diamond]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/extras-2]
============================================================== warnings summary ==============================================================
/home/harsh/code/py/pypa/pip/.tox/py36/lib/python3.6/site-packages/pip/_internal/pep425tags.py:34: RuntimeWarning: I have the wrong path!
warnings.warn("{}".format(e), RuntimeWarning)
/home/harsh/code/py/pypa/pip/.tox/py36/lib/python3.6/site-packages/pip/_internal/req/req_file.py:189: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options, opts)
-- Docs: https://docs.pytest.org/en/latest/warnings.html
================================= 4 failed, 1605 passed, 40 skipped, 5 xfailed, 2 warnings in 509.56 seconds =================================
ERROR: InvocationError for command /home/harsh/code/py/pypa/pip/.tox/py36/bin/pytest --timeout 300 -n auto (exited with code 1)
__________________________________________________________________ summary ___________________________________________________________________
ERROR: py36: commands failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment