tox-dev / tox

Command line driven CI frontend and development task automation tool.
https://tox.wiki
MIT License
3.7k stars 523 forks source link

openSUSE/Tumbleweed test support #1293

Closed mcepl closed 4 years ago

mcepl commented 5 years ago

This is basically reopening of #1188 which was closed without any good reason (what effect has use of setup.py build on tests? That would be a bug in itself, wouldn't it?). Anyway, I have rewritten our packaging scripts to use only pip and of course I was able to fully reproduce the original problem. Complete full build log and specifically error message is:

Error message ``` [ 62s] =================================== FAILURES =================================== [ 62s] ____________________________ test_provision_missing ____________________________ [ 62s] [ 62s] initproj = [ 62s] cmd = [ 62s] [ 62s] def test_provision_missing(initproj, cmd): [ 62s] initproj( [ 62s] "pkg123-0.7", [ 62s] filedefs={ [ 62s] "tox.ini": """ [ 62s] [tox] [ 62s] skipsdist=True [ 62s] minversion = 3.7.0 [ 62s] requires = setuptools == 40.6.3 [ 62s] [testenv] [ 62s] commands=python -c "import sys; print(sys.executable); raise SystemExit(1)" [ 62s] """ [ 62s] }, [ 62s] ) [ 62s] result = cmd("-q", "-q") [ 62s] result.assert_fail() [ 62s] meta_python = Path(result.out.strip()) [ 62s] > assert meta_python.exists() [ 62s] E AssertionError: assert False [ 62s] E + where False = () [ 62s] E + where = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_provision_missing0/pkg123/.tox/.tox/bin/python: No module named tox').exists [ 62s] [ 62s] cmd = [ 62s] initproj = [ 62s] meta_python = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_provision_missing0/pkg123/.tox/.tox/bin/python: No module named tox') [ 62s] result = RunResult(ret=1, args=-q -q, out= [ 62s] /tmp/pytest-of-abuild/pytest-0/test_provision_missing0/pkg123/.tox/.tox/bin/python: No module named tox [ 62s] [ 62s] , err= [ 62s] ) [ 62s] [ 62s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/integration/test_provision_int.py:29: AssertionError [ 62s] ________________________ test_provision_interrupt_child ________________________ [ 62s] [ 62s] initproj = [ 62s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd7fb37b6d0> [ 62s] capfd = <_pytest.capture.CaptureFixture object at 0x7fd7fb37b850> [ 62s] [ 62s] @pytest.mark.skipif( [ 62s] "sys.platform == 'win32'", reason="triggering SIGINT reliably on Windows is hard" [ 62s] ) [ 62s] def test_provision_interrupt_child(initproj, monkeypatch, capfd): [ 62s] monkeypatch.delenv(str("PYTHONPATH"), raising=False) [ 62s] monkeypatch.setenv(str("TOX_REPORTER_TIMESTAMP"), str("1")) [ 62s] initproj( [ 62s] "pkg123-0.7", [ 62s] filedefs={ [ 62s] "tox.ini": """ [ 62s] [tox] [ 62s] skipsdist=True [ 62s] minversion = 3.7.0 [ 62s] requires = setuptools == 40.6.3 [ 62s] tox == 3.7.0 [ 62s] [testenv:b] [ 62s] commands=python -c "import time; open('a', 'w').write('content'); \ [ 62s] time.sleep(10)" [ 62s] basepython = python [ 62s] """ [ 62s] }, [ 62s] ) [ 62s] cmd = [sys.executable, MAIN_FILE, "-v", "-v", "-e", "b"] [ 62s] process = subprocess.Popen( [ 62s] cmd, [ 62s] creationflags=( [ 62s] subprocess.CREATE_NEW_PROCESS_GROUP [ 62s] if sys.platform == "win32" [ 62s] else 0 [ 62s] # needed for Windows signal send ability (CTRL+C) [ 62s] ), [ 62s] ) [ 62s] try: [ 62s] import psutil [ 62s] [ 62s] current_process = psutil.Process(process.pid) [ 62s] except ImportError: [ 62s] current_process = None [ 62s] [ 62s] signal_file = Path() / "a" [ 62s] while not signal_file.exists() and process.poll() is None: [ 62s] time.sleep(0.1) [ 62s] if process.poll() is not None: [ 62s] out, err = process.communicate() [ 62s] > assert False, out [ 62s] E AssertionError: None [ 62s] E assert False [ 62s] [ 62s] capfd = <_pytest.capture.CaptureFixture object at 0x7fd7fb37b850> [ 62s] cmd = ['/usr/bin/python2', '/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python2.7/site-packages/tox/__main__.py', '-v', '-v', '-e', 'b'] [ 62s] current_process = None [ 62s] err = None [ 62s] initproj = [ 62s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd7fb37b6d0> [ 62s] out = None [ 62s] process = [ 62s] signal_file = PosixPath('a') [ 62s] [ 62s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/integration/test_provision_int.py:76: AssertionError [ 62s] ----------------------------- Captured stderr call ----------------------------- [ 62s] Traceback (most recent call last): [ 62s] File "/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python2.7/site-packages/tox/__main__.py", line 1, in [ 62s] import tox [ 62s] ImportError: No module named tox [ 62s] __________________ TestParseconfig.test_workdir_gets_resolved __________________ [ 62s] [ 62s] self = [ 62s] tmp_path = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_workdir_gets_resolved0') [ 62s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd7fc19b550> [ 62s] [ 62s] @pytest.mark.skipif(sys.platform == "win32", reason="no symlinks on Windows") [ 62s] def test_workdir_gets_resolved(self, tmp_path, monkeypatch): [ 62s] """ [ 62s] Test explicitly setting config path, both with and without the filename [ 62s] """ [ 62s] real = tmp_path / "real" [ 62s] real.mkdir() [ 62s] symlink = tmp_path / "link" [ 62s] symlink.symlink_to(real) [ 62s] [ 62s] (tmp_path / "tox.ini").touch() [ 62s] > monkeypatch.chdir(tmp_path) [ 62s] [ 62s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd7fc19b550> [ 62s] real = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_workdir_gets_resolved0/real') [ 62s] self = [ 62s] symlink = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_workdir_gets_resolved0/link') [ 62s] tmp_path = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_workdir_gets_resolved0') [ 62s] [ 62s] tests/unit/config/test_config.py:290: [ 62s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 62s] [ 62s] self = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd7fc19b550> [ 62s] path = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_workdir_gets_resolved0') [ 62s] [ 62s] def chdir(self, path): [ 62s] """ Change the current working directory to the specified path. [ 62s] Path can be a string or a py.path.local object. [ 62s] """ [ 62s] if self._cwd is None: [ 62s] self._cwd = os.getcwd() [ 62s] if hasattr(path, "chdir"): [ 62s] path.chdir() [ 62s] else: [ 62s] > os.chdir(path) [ 62s] E TypeError: coercing to Unicode: need string or buffer, PosixPath found [ 62s] [ 62s] path = PosixPath('/tmp/pytest-of-abuild/pytest-0/test_workdir_gets_resolved0') [ 62s] self = <_pytest.monkeypatch.MonkeyPatch object at 0x7fd7fc19b550> [ 62s] [ 62s] /usr/lib/python2.7/site-packages/_pytest/monkeypatch.py:271: TypeError [ 62s] =========================== short test summary info ============================ [ 62s] FAIL tests/integration/test_provision_int.py::test_provision_missing [ 62s] FAIL tests/integration/test_provision_int.py::test_provision_interrupt_child [ 62s] FAIL tests/unit/config/test_config.py::TestParseconfig::()::test_workdir_gets_resolved [ 62s] SKIP [1] tests/integration/test_jython_env_create.py:5: needs jython and dev cut of virtualenv [ 62s] SKIP [1] tests/unit/test_interpreters.py:29: non posix test [ 62s] ======= 3 failed, 423 passed, 2 skipped, 23 deselected in 28.22 seconds ======== [ 62s] error: Bad exit status from /var/tmp/rpm-tmp.bOzb4n (%check) [ 62s] [ 62s] [ 62s] RPM build errors: [ 62s] Bad exit status from /var/tmp/rpm-tmp.bOzb4n (%check) [ 62s] [ 62s] milic failed "build python-tox.spec" at Thu May 9 14:15:23 UTC 2019. [ 62s] ``` If I switch off python2, the result is even worse ([full build log](https://github.com/tox-dev/tox/files/3162947/log.txt)): ``` [ 38s] =================================== FAILURES =================================== [ 38s] ____________________________ test_provision_missing ____________________________ [ 38s] [ 38s] initproj = .initproj_ at 0x7fab392e29d8> [ 38s] cmd = .run at 0x7fab392e2c80> [ 38s] [ 38s] def test_provision_missing(initproj, cmd): [ 38s] initproj( [ 38s] "pkg123-0.7", [ 38s] filedefs={ [ 38s] "tox.ini": """ [ 38s] [tox] [ 38s] skipsdist=True [ 38s] minversion = 3.7.0 [ 38s] requires = setuptools == 40.6.3 [ 38s] [testenv] [ 38s] commands=python -c "import sys; print(sys.executable); raise Sy stemExit(1)" [ 38s] """ [ 38s] }, [ 38s] ) [ 38s] result = cmd("-q", "-q") [ 38s] result.assert_fail() [ 38s] meta_python = Path(result.out.strip()) [ 38s] > assert meta_python.exists() [ 38s] E AssertionError: assert False [ 38s] E + where False = () [ 38s] E + where = PosixPath('/tm p/pytest-of-abuild/pytest-8/test_provision_missing0/pkg123/.tox/.tox/bin/python: No module named tox').exists [ 38s] [ 38s] cmd = .run at 0x7fab392e2c80> [ 38s] initproj = .initproj_ at 0x7fab392e29d8> [ 38s] meta_python = PosixPath('/tmp/pytest-of-abuild/pytest-8/test_provision_missing0/pkg123/ .tox/.tox/bin/python: No module named tox') [ 38s] result = RunResult(ret=1, args=-q -q, out= [ 38s] /tmp/pytest-of-abuild/pytest-8/test_provision_missing0/pkg123/.tox/.tox/bin/python: No module named tox [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/integration/test_provision_int.py:29: Asser tionError [ 38s] ________________________ test_provision_interrupt_child ________________________ [ 38s] [ 38s] initproj = .initproj_ at 0x7fab38b6abf8> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab39516128> [ 38s] capfd = <_pytest.capture.CaptureFixture object at 0x7fab38b73dd8> [ 38s] [ 38s] @pytest.mark.skipif( [ 38s] "sys.platform == 'win32'", reason="triggering SIGINT reliably on Windows is har d" [ 38s] ) [ 38s] def test_provision_interrupt_child(initproj, monkeypatch, capfd): [ 38s] monkeypatch.delenv(str("PYTHONPATH"), raising=False) [ 38s] monkeypatch.setenv(str("TOX_REPORTER_TIMESTAMP"), str("1")) [ 38s] initproj( [ 38s] "pkg123-0.7", [ 38s] filedefs={ [ 38s] "tox.ini": """ [ 38s] [tox] [ 38s] skipsdist=True [ 38s] minversion = 3.7.0 [ 38s] requires = setuptools == 40.6.3 [ 38s] tox == 3.7.0 [ 38s] [testenv:b] [ 38s] commands=python -c "import time; open('a', 'w').write('content' ); \ [ 38s] time.sleep(10)" [ 38s] basepython = python [ 38s] """ [ 38s] }, [ 38s] ) [ 38s] cmd = [sys.executable, MAIN_FILE, "-v", "-v", "-e", "b"] [ 38s] process = subprocess.Popen( [ 38s] cmd, [ 38s] creationflags=( [ 38s] subprocess.CREATE_NEW_PROCESS_GROUP [ 38s] if sys.platform == "win32" [ 38s] else 0 [ 38s] # needed for Windows signal send ability (CTRL+C) [ 38s] ), [ 38s] ) [ 38s] try: [ 38s] import psutil [ 38s] [ 38s] current_process = psutil.Process(process.pid) [ 38s] except ImportError: [ 38s] current_process = None [ 38s] [ 38s] signal_file = Path() / "a" [ 38s] while not signal_file.exists() and process.poll() is None: [ 38s] time.sleep(0.1) [ 38s] if process.poll() is not None: [ 38s] out, err = process.communicate() [ 38s] > assert False, out [ 38s] E AssertionError: None [ 38s] E assert False [ 38s] [ 38s] capfd = <_pytest.capture.CaptureFixture object at 0x7fab38b73dd8> [ 38s] cmd = ['/usr/bin/python3', '/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x 86_64/usr/lib/python3.7/site-packages/tox/__main__.py', '-v', '-v', '-e', 'b'] [ 38s] current_process = None [ 38s] err = None [ 38s] initproj = .initproj_ at 0x7fab38b6abf8> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab39516128> [ 38s] out = None [ 38s] process = [ 38s] signal_file = PosixPath('a') [ 38s] [ 38s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/integration/test_provision_int.py:76: Asser tionError [ 38s] ----------------------------- Captured stderr call ----------------------------- [ 38s] Traceback (most recent call last): [ 38s] File "/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/sit e-packages/tox/__main__.py", line 1, in [ 38s] import tox [ 38s] ModuleNotFoundError: No module named 'tox' [ 38s] __________________________ test_install_deps_wildcard __________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab392bc8c8> [ 38s] [ 38s] def test_install_deps_wildcard(newmocksession): [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [tox] [ 38s] distshare = {toxworkdir}/distshare [ 38s] [testenv:py123] [ 38s] deps= [ 38s] {distshare}/dep1-* [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("py123") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] tox_testenv_create(action=action, venv=venv) [ 38s] pcalls = mocksession._pcalls [ 38s] assert len(pcalls) == 1 [ 38s] distshare = venv.envconfig.config.distshare [ 38s] distshare.ensure("dep1-1.0.zip") [ 38s] distshare.ensure("dep1-1.1.zip") [ 38s] [ 38s] > tox_testenv_install_deps(action=action, venv=venv) [ 38s] [ 38s] action = [ 38s] distshare = local('/tmp/pytest-of-abuild/pytest-8/test_install_deps_wildcard0/.tox/dis tshare') [ 38s] mocksession = .MockSession object at 0x7f ab392c37b8> [ 38s] newmocksession = .newmocksession_ at 0x7fab392bc8c8> [ 38s] pcalls = [] [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:154: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:7 00: in tox_testenv_install_deps [ 38s] venv._install(deps, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:4 47: in _install [ 38s] self.run_install_command(packages=packages, options=options, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_deps_wildcard0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_deps_wildcard0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] py123 installdeps: /tmp/pytest-of-abuild/pytest-8/test_install_deps_wildcard0/.tox/dist share/dep1-1.1.zip [ 38s] ________________________ test_install_deps_indexserver _________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab3929e8c8> [ 38s] [ 38s] def test_install_deps_indexserver(newmocksession): [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [tox] [ 38s] indexserver = [ 38s] abc = ABC [ 38s] abc2 = ABC [ 38s] [testenv:py123] [ 38s] deps= [ 38s] dep1 [ 38s] :abc:dep2 [ 38s] :abc2:dep3 [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("py123") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] tox_testenv_create(action=action, venv=venv) [ 38s] pcalls = mocksession._pcalls [ 38s] assert len(pcalls) == 1 [ 38s] pcalls[:] = [] [ 38s] [ 38s] > tox_testenv_install_deps(action=action, venv=venv) [ 38s] [ 38s] action = [ 38s] mocksession = .MockSession object at 0x7f ab392b1390> [ 38s] newmocksession = .newmocksession_ at 0x7fab3929e8c8> [ 38s] pcalls = [] [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:188: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:7 00: in tox_testenv_install_deps [ 38s] venv._install(deps, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:4 47: in _install [ 38s] self.run_install_command(packages=packages, options=options, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_deps_indexserver0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_deps_indexserver0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] py123 installdeps: dep1, :abc:dep2, :abc2:dep3 [ 38s] ____________________________ test_install_deps_pre _____________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab38b6abf8> [ 38s] [ 38s] def test_install_deps_pre(newmocksession): [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [testenv] [ 38s] pip_pre=true [ 38s] deps= [ 38s] dep1 [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("python") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] tox_testenv_create(action=action, venv=venv) [ 38s] pcalls = mocksession._pcalls [ 38s] assert len(pcalls) == 1 [ 38s] pcalls[:] = [] [ 38s] [ 38s] > tox_testenv_install_deps(action=action, venv=venv) [ 38s] [ 38s] action = [ 38s] mocksession = .MockSession object at 0x7f ab392c8668> [ 38s] newmocksession = .newmocksession_ at 0x7fab38b6abf8> [ 38s] pcalls = [] [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:220: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:7 00: in tox_testenv_install_deps [ 38s] venv._install(deps, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:4 47: in _install [ 38s] self.run_install_command(packages=packages, options=options, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_deps_pre0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_deps_pre0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python installdeps: dep1 [ 38s] _________________________ test_installpkg_indexserver __________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab392a9a60> [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_indexserver0') [ 38s] [ 38s] def test_installpkg_indexserver(newmocksession, tmpdir): [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [tox] [ 38s] indexserver = [ 38s] default = ABC [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("python") [ 38s] pcalls = mocksession._pcalls [ 38s] p = tmpdir.ensure("distfile.tar.gz") [ 38s] installpkg(venv, p) [ 38s] # two different index servers, two calls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] mocksession = .MockSession object at 0x7f ab390b1e48> [ 38s] newmocksession = .newmocksession_ at 0x7fab392a9a60> [ 38s] p = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_indexserver0/distfil e.tar.gz') [ 38s] pcalls = [] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_indexserver0') [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:241: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python inst-nodeps: /tmp/pytest-of-abuild/pytest-8/test_installpkg_indexserver0/distfil e.tar.gz [ 38s] __________________________ test_install_sdist_extras ___________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab3933cae8> [ 38s] [ 38s] def test_install_sdist_extras(newmocksession): [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [testenv] [ 38s] extras = testing [ 38s] development [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("python") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] tox_testenv_create(action=action, venv=venv) [ 38s] pcalls = mocksession._pcalls [ 38s] assert len(pcalls) == 1 [ 38s] pcalls[:] = [] [ 38s] [ 38s] > venv.installpkg("distfile.tar.gz", action=action) [ 38s] [ 38s] action = [ 38s] mocksession = .MockSession object at 0x7f ab3922f9b0> [ 38s] newmocksession = .newmocksession_ at 0x7fab3933cae8> [ 38s] pcalls = [] [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:281: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 62: in installpkg [ 38s] self.install_pkg(sdistpath, action, "inst") [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 56: in install_pkg [ 38s] self._install(target, extraopts=pip_flags, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:4 47: in _install [ 38s] self.run_install_command(packages=packages, options=options, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_sdist_extras0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_sdist_extras0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python inst-nodeps: distfile.tar.gz [ 38s] _____________________________ test_develop_extras ______________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab392cdae8> [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_develop_extras0') [ 38s] [ 38s] def test_develop_extras(newmocksession, tmpdir): [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [testenv] [ 38s] extras = testing [ 38s] development [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("python") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] tox_testenv_create(action=action, venv=venv) [ 38s] pcalls = mocksession._pcalls [ 38s] assert len(pcalls) == 1 [ 38s] pcalls[:] = [] [ 38s] [ 38s] > venv.developpkg(tmpdir, action=action) [ 38s] [ 38s] action = [ 38s] mocksession = .MockSession object at 0x7f ab39225668> [ 38s] newmocksession = .newmocksession_ at 0x7fab392cdae8> [ 38s] pcalls = [, ] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_develop_extras0') [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:301: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 59: in developpkg [ 38s] self.install_pkg(setupdir, action, "develop-inst", is_develop=True) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 56: in install_pkg [ 38s] self._install(target, extraopts=pip_flags, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:4 47: in _install [ 38s] self.run_install_command(packages=packages, options=options, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_develop_extras0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_develop_extras0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python develop-inst-nodeps: /tmp/pytest-of-abuild/pytest-8/test_develop_extras0 [ 38s] _____________________________ test_install_python3 _____________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab3929e8c8> [ 38s] [ 38s] def test_install_python3(newmocksession): [ 38s] if not py.path.local.sysfind("python3"): [ 38s] pytest.skip("needs python3") [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [testenv:py123] [ 38s] basepython=python3 [ 38s] deps= [ 38s] dep1 [ 38s] dep2 [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("py123") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] tox_testenv_create(action=action, venv=venv) [ 38s] pcalls = mocksession._pcalls [ 38s] assert len(pcalls) == 1 [ 38s] args = pcalls[0].args [ 38s] assert str(args[2]) == "virtualenv" [ 38s] pcalls[:] = [] [ 38s] with mocksession.newaction(venv.name, "hello") as action: [ 38s] > venv._install(["hello"], action=action) [ 38s] [ 38s] action = [ 38s] args = ['/usr/bin/python3', '-m', 'virtualenv', '--no-download', '--python', '/us r/bin/python3', ...] [ 38s] mocksession = .MockSession object at 0x7f ab39320160> [ 38s] newmocksession = .newmocksession_ at 0x7fab3929e8c8> [ 38s] pcalls = [] [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:454: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:4 47: in _install [ 38s] self.run_install_command(packages=packages, options=options, action=action) [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_python30') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_install_python30') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] _____________________ TestVenvTest.test_pythonpath_remove ______________________ [ 38s] [ 38s] self = [ 38s] newmocksession = .newmocksession_ at 0x7fab392e2c80> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab392fce80> [ 38s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fab38b845f8> [ 38s] [ 38s] def test_pythonpath_remove(self, newmocksession, monkeypatch, caplog): [ 38s] monkeypatch.setenv("PYTHONPATH", "/my/awesome/library") [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [testenv:python] [ 38s] commands=abc [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("python") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] > venv.run_install_command(["qwe"], action=action) [ 38s] [ 38s] action = [ 38s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fab38b845f8> [ 38s] mocksession = .MockSession object at 0x7f ab392fcc18> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab392fce80> [ 38s] newmocksession = .newmocksession_ at 0x7fab392e2c80> [ 38s] self = [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:653: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_pythonpath_remove0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_pythonpath_remove0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'pa ssenv' in your configuration. [ 38s] ______________________ TestVenvTest.test_pythonpath_keep _______________________ [ 38s] [ 38s] self = [ 38s] newmocksession = .newmocksession_ at 0x7fab392a9d08> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab39114c88> [ 38s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fab391140f0> [ 38s] [ 38s] def test_pythonpath_keep(self, newmocksession, monkeypatch, caplog): [ 38s] # passenv = PYTHONPATH allows PYTHONPATH to stay in environment [ 38s] monkeypatch.setenv("PYTHONPATH", "/my/awesome/library") [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [testenv:python] [ 38s] commands=abc [ 38s] passenv = PYTHONPATH [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("python") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] > venv.run_install_command(["qwe"], action=action) [ 38s] [ 38s] action = [ 38s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fab391140f0> [ 38s] mocksession = .MockSession object at 0x7f ab391147b8> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab39114c88> [ 38s] newmocksession = .newmocksession_ at 0x7fab392a9d08> [ 38s] self = [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:673: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_pythonpath_keep0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_pythonpath_keep0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ______________________ TestVenvTest.test_pythonpath_empty ______________________ [ 38s] [ 38s] self = [ 38s] newmocksession = .newmocksession_ at 0x7fab392bcc80> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab38a57cc0> [ 38s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fab38a57940> [ 38s] [ 38s] def test_pythonpath_empty(self, newmocksession, monkeypatch, caplog): [ 38s] monkeypatch.setenv("PYTHONPATH", "") [ 38s] mocksession = newmocksession( [ 38s] [], [ 38s] """ [ 38s] [testenv:python] [ 38s] commands=abc [ 38s] """, [ 38s] ) [ 38s] venv = mocksession.getvenv("python") [ 38s] with mocksession.newaction(venv.name, "getenv") as action: [ 38s] > venv.run_install_command(["qwe"], action=action) [ 38s] [ 38s] action = [ 38s] caplog = <_pytest.logging.LogCaptureFixture object at 0x7fab38a57940> [ 38s] mocksession = .MockSession object at 0x7f ab38a57128> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab38a57cc0> [ 38s] newmocksession = .newmocksession_ at 0x7fab392bcc80> [ 38s] self = [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:692: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_pythonpath_empty0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_pythonpath_empty0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] ______________________ test_env_variables_added_to_pcall _______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_env_variables_added_to_pc0') [ 38s] mocksession = .MockSession object at 0x7f ab38b73908> [ 38s] newconfig = .create_new_config_file_ at 0x7fab 38a5f8c8> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab391191d0> [ 38s] [ 38s] def test_env_variables_added_to_pcall(tmpdir, mocksession, newconfig, monkeypatch): [ 38s] monkeypatch.delenv("PYTHONPATH", raising=False) [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] monkeypatch.setenv("X123", "123") [ 38s] monkeypatch.setenv("YY", "456") [ 38s] config = newconfig( [ 38s] [], [ 38s] """ [ 38s] [testenv:python] [ 38s] commands=python -V [ 38s] passenv = x123 [ 38s] setenv = [ 38s] ENV_VAR = value [ 38s] PYTHONPATH = value [ 38s] """, [ 38s] ) [ 38s] mocksession._clearmocks() [ 38s] mocksession.new_config(config) [ 38s] venv = mocksession.getvenv("python") [ 38s] installpkg(venv, pkg) [ 38s] venv.test() [ 38s] [ 38s] pcalls = mocksession._pcalls [ 38s] > assert len(pcalls) == 2 [ 38s] E assert 0 == 2 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] config = [ 38s] mocksession = .MockSession object at 0x7f ab38b73908> [ 38s] monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7fab391191d0> [ 38s] newconfig = .create_new_config_file_ at 0x7fa b38a5f8c8> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_env_variables_added_to_pc0/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_env_variables_added_to_pc0') [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:726: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python inst-nodeps: /tmp/pytest-of-abuild/pytest-8/test_env_variables_added_to_pc0/pack age.tar.gz [ 38s] python run-test: commands[0] | python -V [ 38s] ERROR: InvocationError for command could not find executable python [ 38s] __________________________ test_installpkg_no_upgrade __________________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_no_upgrade0') [ 38s] newmocksession = .newmocksession_ at 0x7fab39294ae8> [ 38s] [ 38s] def test_installpkg_no_upgrade(tmpdir, newmocksession): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mocksession = newmocksession([], "") [ 38s] venv = mocksession.getvenv("python") [ 38s] venv.just_created = True [ 38s] venv.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(venv, pkg) [ 38s] pcalls = mocksession._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] mocksession = .MockSession object at 0x7f ab38f3eb70> [ 38s] newmocksession = .newmocksession_ at 0x7fab39294ae8> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_no_upgrade0/package. tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_no_upgrade0') [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:757: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_installpkg_no_upgrade0/package.tar.gz [ 38s] _____________________ test_install_command_verbosity[0-0] ______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity0') [ 38s] newmocksession = .newmocksession_ at 0x7fab392e29d8> [ 38s] count = 0, level = 0 [ 38s] [ 38s] @pytest.mark.parametrize("count, level", [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), ( 5, 3), (6, 3)]) [ 38s] def test_install_command_verbosity(tmpdir, newmocksession, count, level): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mock_session = newmocksession(["-{}".format("v" * count)], "") [ 38s] env = mock_session.getvenv("python") [ 38s] env.just_created = True [ 38s] env.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(env, pkg) [ 38s] pcalls = mock_session._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] count = 0 [ 38s] env = [ 38s] level = 0 [ 38s] mock_session = .MockSession object at 0x7 fab397299e8> [ 38s] newmocksession = .newmocksession_ at 0x7fab392e29d8> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity0/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity0') [ 38s] [ 38s] tests/unit/test_venv.py:770: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity0/package.tar .gz [ 38s] _____________________ test_install_command_verbosity[1-0] ______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity1') [ 38s] newmocksession = .newmocksession_ at 0x7fab3929eae8> [ 38s] count = 1, level = 0 [ 38s] [ 38s] @pytest.mark.parametrize("count, level", [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), ( 5, 3), (6, 3)]) [ 38s] def test_install_command_verbosity(tmpdir, newmocksession, count, level): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mock_session = newmocksession(["-{}".format("v" * count)], "") [ 38s] env = mock_session.getvenv("python") [ 38s] env.just_created = True [ 38s] env.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(env, pkg) [ 38s] pcalls = mock_session._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] count = 1 [ 38s] env = [ 38s] level = 0 [ 38s] mock_session = .MockSession object at 0x7 fab39140ba8> [ 38s] newmocksession = .newmocksession_ at 0x7fab3929eae8> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity1/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity1') [ 38s] [ 38s] tests/unit/test_venv.py:770: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity1/tox.ini ( pid 9835) [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity1/package.tar .gz [ 38s] write config to /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity1/.tox/pyt hon/.tox-config1 as '80a0983ed285f8cb443aa2d304a05890 /usr/bin/python3\n3.8.1 0 0 0' [ 38s] _____________________ test_install_command_verbosity[2-0] ______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2') [ 38s] newmocksession = .newmocksession_ at 0x7fab392cd620> [ 38s] count = 2, level = 0 [ 38s] [ 38s] @pytest.mark.parametrize("count, level", [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), ( 5, 3), (6, 3)]) [ 38s] def test_install_command_verbosity(tmpdir, newmocksession, count, level): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mock_session = newmocksession(["-{}".format("v" * count)], "") [ 38s] env = mock_session.getvenv("python") [ 38s] env.just_created = True [ 38s] env.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(env, pkg) [ 38s] pcalls = mock_session._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] count = 2 [ 38s] env = [ 38s] level = 0 [ 38s] mock_session = .MockSession object at 0x7 fab389cb048> [ 38s] newmocksession = .newmocksession_ at 0x7fab392cd620> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2') [ 38s] [ 38s] tests/unit/test_venv.py:770: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2/tox.ini ( pid 9835) [ 38s] python start: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2 /package.tar.gz [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2/package.tar .gz [ 38s] write config to /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2/.tox/pyt hon/.tox-config1 as '80a0983ed285f8cb443aa2d304a05890 /usr/bin/python3\n3.8.1 0 0 0' [ 38s] setting PATH=/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity2/.tox/python /bin:/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/bin:/var/lib/build/ccache/bin :/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin [ 38s] python finish: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity 2/package.tar.gz after 0.04 seconds [ 38s] _____________________ test_install_command_verbosity[3-1] ______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3') [ 38s] newmocksession = .newmocksession_ at 0x7fab38a5f8c8> [ 38s] count = 3, level = 1 [ 38s] [ 38s] @pytest.mark.parametrize("count, level", [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), ( 5, 3), (6, 3)]) [ 38s] def test_install_command_verbosity(tmpdir, newmocksession, count, level): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mock_session = newmocksession(["-{}".format("v" * count)], "") [ 38s] env = mock_session.getvenv("python") [ 38s] env.just_created = True [ 38s] env.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(env, pkg) [ 38s] pcalls = mock_session._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] count = 3 [ 38s] env = [ 38s] level = 1 [ 38s] mock_session = .MockSession object at 0x7 fab392984e0> [ 38s] newmocksession = .newmocksession_ at 0x7fab38a5f8c8> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3') [ 38s] [ 38s] tests/unit/test_venv.py:770: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3/tox.ini ( pid 9835) [ 38s] python start: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3 /package.tar.gz [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3/package.tar .gz [ 38s] write config to /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3/.tox/pyt hon/.tox-config1 as '80a0983ed285f8cb443aa2d304a05890 /usr/bin/python3\n3.8.1 0 0 0' [ 38s] setting PATH=/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity3/.tox/python /bin:/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/bin:/var/lib/build/ccache/bin :/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin [ 38s] python finish: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity 3/package.tar.gz after 0.03 seconds [ 38s] _____________________ test_install_command_verbosity[4-2] ______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4') [ 38s] newmocksession = .newmocksession_ at 0x7fab3933c1e0> [ 38s] count = 4, level = 2 [ 38s] [ 38s] @pytest.mark.parametrize("count, level", [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), ( 5, 3), (6, 3)]) [ 38s] def test_install_command_verbosity(tmpdir, newmocksession, count, level): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mock_session = newmocksession(["-{}".format("v" * count)], "") [ 38s] env = mock_session.getvenv("python") [ 38s] env.just_created = True [ 38s] env.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(env, pkg) [ 38s] pcalls = mock_session._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] count = 4 [ 38s] env = [ 38s] level = 2 [ 38s] mock_session = .MockSession object at 0x7 fab394698d0> [ 38s] newmocksession = .newmocksession_ at 0x7fab3933c1e0> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4') [ 38s] [ 38s] tests/unit/test_venv.py:770: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4/tox.ini ( pid 9835) [ 38s] python start: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4 /package.tar.gz [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4/package.tar .gz [ 38s] write config to /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4/.tox/pyt hon/.tox-config1 as '80a0983ed285f8cb443aa2d304a05890 /usr/bin/python3\n3.8.1 0 0 0' [ 38s] setting PATH=/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity4/.tox/python /bin:/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/bin:/var/lib/build/ccache/bin :/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin [ 38s] python finish: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity 4/package.tar.gz after 0.03 seconds [ 38s] _____________________ test_install_command_verbosity[5-3] ______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5') [ 38s] newmocksession = .newmocksession_ at 0x7fab392b7d08> [ 38s] count = 5, level = 3 [ 38s] [ 38s] @pytest.mark.parametrize("count, level", [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), ( 5, 3), (6, 3)]) [ 38s] def test_install_command_verbosity(tmpdir, newmocksession, count, level): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mock_session = newmocksession(["-{}".format("v" * count)], "") [ 38s] env = mock_session.getvenv("python") [ 38s] env.just_created = True [ 38s] env.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(env, pkg) [ 38s] pcalls = mock_session._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] count = 5 [ 38s] env = [ 38s] level = 3 [ 38s] mock_session = .MockSession object at 0x7 fab391a4e80> [ 38s] newmocksession = .newmocksession_ at 0x7fab392b7d08> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5') [ 38s] [ 38s] tests/unit/test_venv.py:770: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5/tox.ini ( pid 9835) [ 38s] python start: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5 /package.tar.gz [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5/package.tar .gz [ 38s] write config to /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5/.tox/pyt hon/.tox-config1 as '80a0983ed285f8cb443aa2d304a05890 /usr/bin/python3\n3.8.1 0 0 0' [ 38s] setting PATH=/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity5/.tox/python /bin:/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/bin:/var/lib/build/ccache/bin :/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin [ 38s] python finish: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity 5/package.tar.gz after 0.04 seconds [ 38s] _____________________ test_install_command_verbosity[6-3] ______________________ [ 38s] [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6') [ 38s] newmocksession = .newmocksession_ at 0x7fab38a87b70> [ 38s] count = 6, level = 3 [ 38s] [ 38s] @pytest.mark.parametrize("count, level", [(0, 0), (1, 0), (2, 0), (3, 1), (4, 2), ( 5, 3), (6, 3)]) [ 38s] def test_install_command_verbosity(tmpdir, newmocksession, count, level): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mock_session = newmocksession(["-{}".format("v" * count)], "") [ 38s] env = mock_session.getvenv("python") [ 38s] env.just_created = True [ 38s] env.envconfig.envdir.ensure(dir=1) [ 38s] installpkg(env, pkg) [ 38s] pcalls = mock_session._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] count = 6 [ 38s] env = [ 38s] level = 3 [ 38s] mock_session = .MockSession object at 0x7 fab390b1e48> [ 38s] newmocksession = .newmocksession_ at 0x7fab38a87b70> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6/pack age.tar.gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6') [ 38s] [ 38s] tests/unit/test_venv.py:770: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6/tox.ini ( pid 9835) [ 38s] python start: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6 /package.tar.gz [ 38s] python inst: /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6/package.tar .gz [ 38s] write config to /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6/.tox/pyt hon/.tox-config1 as '80a0983ed285f8cb443aa2d304a05890 /usr/bin/python3\n3.8.1 0 0 0' [ 38s] setting PATH=/tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity6/.tox/python /bin:/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/bin:/var/lib/build/ccache/bin :/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin [ 38s] python finish: installpkg /tmp/pytest-of-abuild/pytest-8/test_install_command_verbosity 6/package.tar.gz after 0.03 seconds [ 38s] ___________________________ test_installpkg_upgrade ____________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab38a64950> [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_upgrade0') [ 38s] [ 38s] def test_installpkg_upgrade(newmocksession, tmpdir): [ 38s] pkg = tmpdir.ensure("package.tar.gz") [ 38s] mocksession = newmocksession([], "") [ 38s] venv = mocksession.getvenv("python") [ 38s] assert not hasattr(venv, "just_created") [ 38s] installpkg(venv, pkg) [ 38s] pcalls = mocksession._pcalls [ 38s] > assert len(pcalls) == 1 [ 38s] E assert 0 == 1 [ 38s] E + where 0 = len([]) [ 38s] [ 38s] mocksession = .MockSession object at 0x7f ab38bbb588> [ 38s] newmocksession = .newmocksession_ at 0x7fab38a64950> [ 38s] pcalls = [] [ 38s] pkg = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_upgrade0/package.tar .gz') [ 38s] tmpdir = local('/tmp/pytest-of-abuild/pytest-8/test_installpkg_upgrade0') [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:782: AssertionError [ 38s] ----------------------------- Captured stdout call ----------------------------- [ 38s] python inst-nodeps: /tmp/pytest-of-abuild/pytest-8/test_installpkg_upgrade0/package.tar .gz [ 38s] ___________________________ test_run_install_command ___________________________ [ 38s] [ 38s] newmocksession = .newmocksession_ at 0x7fab38bb38c8> [ 38s] [ 38s] def test_run_install_command(newmocksession): [ 38s] mocksession = newmocksession([], "") [ 38s] venv = mocksession.getvenv("python") [ 38s] venv.just_created = True [ 38s] venv.envconfig.envdir.ensure(dir=1) [ 38s] with mocksession.newaction(venv.name, "hello") as action: [ 38s] > venv.run_install_command(packages=["whatever"], action=action) [ 38s] [ 38s] action = [ 38s] mocksession = .MockSession object at 0x7f ab39129cc0> [ 38s] newmocksession = .newmocksession_ at 0x7fab38bb38c8> [ 38s] venv = [ 38s] [ 38s] tests/unit/test_venv.py:795: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:3 97: in run_install_command [ 38s] env=env, [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:5 52: in _pcall [ 38s] args[0] = self.getcommandpath(args[0], venv, cwd) [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = [ 38s] name = 'python', venv = True [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_run_install_command0') [ 38s] [ 38s] def getcommandpath(self, name, venv=True, cwd=None): [ 38s] """ Return absolute path (str or localpath) for specified command name. [ 38s] [ 38s] - If it's a local path we will rewrite it as as a relative path. [ 38s] - If venv is True we will check if the command is coming from the venv [ 38s] or is whitelisted to come from external. [ 38s] """ [ 38s] name = str(name) [ 38s] if os.path.isabs(name): [ 38s] return name [ 38s] if os.path.split(name)[0] == ".": [ 38s] path = cwd.join(name) [ 38s] if path.check(): [ 38s] return str(path) [ 38s] [ 38s] if venv: [ 38s] path = self._venv_lookup_and_check_external_whitelist(name) [ 38s] else: [ 38s] path = self._normal_lookup(name) [ 38s] [ 38s] if path is None: [ 38s] raise tox.exception.InvocationError( [ 38s] > "could not find executable {}".format(pipes.quote(name)) [ 38s] ) [ 38s] E tox.exception.InvocationError: InvocationError for command could not find e xecutable python [ 38s] [ 38s] cwd = local('/tmp/pytest-of-abuild/pytest-8/test_run_install_command0') [ 38s] name = 'python' [ 38s] path = None [ 38s] self = [ 38s] venv = True [ 38s] [ 38s] ../../BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/venv.py:1 76: InvocationError [ 38s] _________________________ test_install_via_installpkg __________________________ [ 38s] [ 38s] mock_venv = OrderedDict([(140373371270256, .Result object at 0x7fab38ee31d0>)]) [ 38s] initproj = .initproj_ at 0x7fab38f52730> [ 38s] cmd = .run at 0x7fab392bcae8> [ 38s] [ 38s] def test_install_via_installpkg(mock_venv, initproj, cmd): [ 38s] base = initproj( [ 38s] "pkg-0.1", [ 38s] filedefs={ [ 38s] "tox.ini": """ [ 38s] [tox] [ 38s] install_cmd = python -m -c 'print("ok")' -- {opts} {packages}' [ 38s] """ [ 38s] }, [ 38s] ) [ 38s] fake_package = base.ensure(".tox", "dist", "pkg123-0.1.zip") [ 38s] result = cmd("-e", "py", "--notest", "--installpkg", str(fake_package.relto(bas e))) [ 38s] > result.assert_success() [ 38s] [ 38s] base = local('/tmp/pytest-of-abuild/pytest-8/test_install_via_installpkg0/pkg') [ 38s] cmd = .run at 0x7fab392bcae8> [ 38s] fake_package = local('/tmp/pytest-of-abuild/pytest-8/test_install_via_installpkg0/pkg/. tox/dist/pkg123-0.1.zip') [ 38s] initproj = .initproj_ at 0x7fab38f52730> [ 38s] mock_venv = OrderedDict([(140373371270256, .Resul t object at 0x7fab38ee31d0>)]) [ 38s] result = RunResult(ret=1, args=-e py --notest --installpkg .tox/dist/pkg123-0.1.zip , out= [ 38s] py inst-nodeps: /tmp/pytest-of-abuild... command /usr/bin/python3 -m pip install --no-d eps -U .tox/.tmp/package/1/pkg123-0.1.zip (exited with code 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/unit/package/test_package.py:20: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = RunResult(ret=1, args=-e py --notest --installpkg .tox/dist/pkg123-0.1.zip, out= [ 38s] py inst-nodeps: /tmp/pytest-of-abuild... command /usr/bin/python3 -m pip install --no-d eps -U .tox/.tmp/package/1/pkg123-0.1.zip (exited with code 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] is_run_test_env = True [ 38s] [ 38s] def assert_success(self, is_run_test_env=True): [ 38s] msg = self.output() [ 38s] > assert self.ret == 0, msg [ 38s] E AssertionError: 1 [ 38s] E [ 38s] E py inst-nodeps: /tmp/pytest-of-abuild/pytest-8/test_install_via_installpkg0/pkg /.tox/.tmp/package/1/pkg123-0.1.zip [ 38s] E WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPAT H in 'passenv' in your configuration. [ 38s] E ERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abuild/pytest-8 /test_install_via_installpkg0/pkg/.tox/py/log/py-0.log [ 38s] E ================================== log start ================================== = [ 38s] E action: py, msg: installpkg [ 38s] E cwd: /tmp/pytest-of-abuild/pytest-8/test_install_via_installpkg0/pkg [ 38s] E cmd: /usr/bin/python3 -m pip install --no-deps -U .tox/.tmp/package/1/pkg123-0. 1.zip [ 38s] E [ 38s] E =================================== log end =================================== = [ 38s] E ___________________________________ summary ___________________________________ _ [ 38s] E ERROR: py: InvocationError for command /usr/bin/python3 -m pip install --no-d eps -U .tox/.tmp/package/1/pkg123-0.1.zip (exited with code 2) [ 38s] [ 38s] is_run_test_env = True [ 38s] msg = '1\n\npy inst-nodeps: /tmp/pytest-of-abuild/pytest-8/test_install_via_inst allpkg0/pkg/.tox/.tmp/package/1/pkg123-0.1.z...ror for command /usr/bin/python3 -m pip install - -no-deps -U .tox/.tmp/package/1/pkg123-0.1.zip (exited with code 2)\n' [ 38s] self = RunResult(ret=1, args=-e py --notest --installpkg .tox/dist/pkg123-0.1.zip , out= [ 38s] py inst-nodeps: /tmp/pytest-of-abuild... command /usr/bin/python3 -m pip install --no-d eps -U .tox/.tmp/package/1/pkg123-0.1.zip (exited with code 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packag es/tox/_pytestplugin.py:188: AssertionError [ 38s] _________________________ test_verbose_isolated_build __________________________ [ 38s] [ 38s] initproj = .initproj_ at 0x7fab392a9e18> [ 38s] mock_venv = OrderedDict([(140373376027616, .Result object at 0x7fab3936c4a8>)]) [ 38s] cmd = .run at 0x7fab392a9048> [ 38s] [ 38s] def test_verbose_isolated_build(initproj, mock_venv, cmd): [ 38s] initproj( [ 38s] "example123-0.5", [ 38s] filedefs={ [ 38s] "tox.ini": """ [ 38s] [tox] [ 38s] isolated_build = true [ 38s] """, [ 38s] "pyproject.toml": """ [ 38s] [build-system] [ 38s] requires = ["setuptools >= 35.0.2"] [ 38s] build-backend = 'setuptools.build_meta' [ 38s] """, [ 38s] }, [ 38s] ) [ 38s] result = cmd("--sdistonly", "-v", "-v", "-v", "-e", "py") [ 38s] > assert "running sdist" in result.out, result.out [ 38s] E AssertionError: using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_verbose_isol ated_build0/example123/tox.ini (pid 9835) [ 38s] E removing /tmp/pytest-of-abuild/pytest-8/test_verbose_isolated_build0/exampl e123/.tox/log [ 38s] E using tox-3.8.1 from /home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_6 4/usr/lib/python3.7/site-packages/tox/__init__.py (pid 9835) [ 38s] E .package start: getenv /tmp/pytest-of-abuild/pytest-8/test_verbose_isolated_b uild0/example123/.tox/.package [ 38s] E .package reusing: /tmp/pytest-of-abuild/pytest-8/test_verbose_isolated_build0 /example123/.tox/.package [ 38s] E .package finish: getenv /tmp/pytest-of-abuild/pytest-8/test_verbose_isolated_ build0/example123/.tox/.package after 0.05 seconds [ 38s] E .package start: finishvenv [ 38s] E .package finish: finishvenv after 0.00 seconds [ 38s] E .package start: get-build-requires /usr [ 38s] E setting PATH=/usr/bin:/home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_ 64/usr/bin:/var/lib/build/ccache/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/ sbin [ 38s] E ERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abuild/pytest -8/test_verbose_isolated_build0/example123/.tox/.package/log/.package-0.log [ 38s] E ================================== log start ================================ === [ 38s] E action: .package, msg: get-build-requires [ 38s] E cwd: /tmp/pytest-of-abuild/pytest-8/test_verbose_isolated_build0/example123 [ 38s] E cmd: /usr/bin/python /home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_6 4/usr/lib/python3.7/site-packages/tox/helper/build_requires.py setuptools.build_meta '' [ 38s] E [ 38s] E =================================== log end ================================= === [ 38s] E ERROR: FAIL could not package project - v = InvocationError("/usr/bin/python /home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/he lper/build_requires.py setuptools.build_meta ''", 2) [ 38s] E [ 38s] E assert 'running sdist' in 'using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_v erbose_isolated_build0/example123/tox.ini (pid 9835)\n removing ...thon-tox-3.8.1-0.x86_64/usr/ lib/python3.7/site-packages/tox/helper/build_requires.py setuptools.build_meta \'\'", 2)\n' [ 38s] E + where 'using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_verbose_isolated_ build0/example123/tox.ini (pid 9835)\n removing ...thon-tox-3.8.1-0.x86_64/usr/lib/python3.7/si te-packages/tox/helper/build_requires.py setuptools.build_meta \'\'", 2)\n' = RunResult(ret=2, a rgs=--sdistonly -v -v -v -e py, out=\nusing tox.ini: /tmp/pytest-of-abuild/pytest-8/test_verbose _isol...tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/helper/build_requires.py setuptoo ls.build_meta ''", 2)\n\n, err=\n).out [ 38s] [ 38s] cmd = .run at 0x7fab392a9048> [ 38s] initproj = .initproj_ at 0x7fab392a9e18> [ 38s] mock_venv = OrderedDict([(140373376027616, .Resul t object at 0x7fab3936c4a8>)]) [ 38s] result = RunResult(ret=2, args=--sdistonly -v -v -v -e py, out= [ 38s] using tox.ini: /tmp/pytest-of-abuild/pytest-8/test_verbose_isol...tox-3.8.1-0.x86_64/us r/lib/python3.7/site-packages/tox/helper/build_requires.py setuptools.build_meta ''", 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/unit/package/builder/test_package_builder_i solated.py:26: AssertionError [ 38s] _______________________ test_dist_exists_version_change ________________________ [ 38s] [ 38s] mock_venv = OrderedDict([(140373368262952, .Result object at 0x7fab38c05908>)]) [ 38s] initproj = .initproj_ at 0x7fab3929ed08> [ 38s] cmd = .run at 0x7fab3929e1e0> [ 38s] [ 38s] def test_dist_exists_version_change(mock_venv, initproj, cmd): [ 38s] base = initproj( [ 38s] "package_toml-{}".format("0.1"), [ 38s] filedefs={ [ 38s] "tox.ini": """ [ 38s] [tox] [ 38s] isolated_build = true [ 38s] """, [ 38s] "pyproject.toml": """ [ 38s] [build-system] [ 38s] requires = ["setuptools >= 35.0.2"] [ 38s] build-backend = 'setuptools.build_meta' [ 38s] """, [ 38s] }, [ 38s] ) [ 38s] result = cmd("-e", "py") [ 38s] > result.assert_success() [ 38s] [ 38s] base = local('/tmp/pytest-of-abuild/pytest-8/test_dist_exists_version_chang0/pack age_toml') [ 38s] cmd = .run at 0x7fab3929e1e0> [ 38s] initproj = .initproj_ at 0x7fab3929ed08> [ 38s] mock_venv = OrderedDict([(140373368262952, .Resul t object at 0x7fab38c05908>)]) [ 38s] result = RunResult(ret=2, args=-e py, out= [ 38s] ERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abuild/pytest-8/test... tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/helper/build_requires.py setuptools.build _meta ''", 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/unit/package/builder/test_package_builder_i solated.py:47: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = RunResult(ret=2, args=-e py, out= [ 38s] ERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abuild/pytest-8/test... tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/helper/build_requires.py setuptools.build _meta ''", 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] is_run_test_env = True [ 38s] [ 38s] def assert_success(self, is_run_test_env=True): [ 38s] msg = self.output() [ 38s] > assert self.ret == 0, msg [ 38s] E AssertionError: 2 [ 38s] E [ 38s] E ERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abuild/pytest-8 /test_dist_exists_version_chang0/package_toml/.tox/.package/log/.package-0.log [ 38s] E ================================== log start ================================== = [ 38s] E action: .package, msg: get-build-requires [ 38s] E cwd: /tmp/pytest-of-abuild/pytest-8/test_dist_exists_version_chang0/package_tom l [ 38s] E cmd: /usr/bin/python /home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/ usr/lib/python3.7/site-packages/tox/helper/build_requires.py setuptools.build_meta '' [ 38s] E [ 38s] E =================================== log end =================================== = [ 38s] E ERROR: FAIL could not package project - v = InvocationError("/usr/bin/python /h ome/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/help er/build_requires.py setuptools.build_meta ''", 2) [ 38s] [ 38s] is_run_test_env = True [ 38s] msg = '2\n\nERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abui ld/pytest-8/test_dist_exists_version_chang0/...thon-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-pa ckages/tox/helper/build_requires.py setuptools.build_meta \'\'", 2)\n' [ 38s] self = RunResult(ret=2, args=-e py, out= [ 38s] ERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abuild/pytest-8/test... tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packages/tox/helper/build_requires.py setuptools.build _meta ''", 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packag es/tox/_pytestplugin.py:188: AssertionError [ 38s] __________________________ test_command_prev_post_ok ___________________________ [ 38s] [ 38s] cmd = .run at 0x7fab390562f0> [ 38s] initproj = .initproj_ at 0x7fab39354ae8> [ 38s] mock_venv = OrderedDict([(140373367851608, .Result object at 0x7fab38ba0cf8>)]) [ 38s] [ 38s] def test_command_prev_post_ok(cmd, initproj, mock_venv): [ 38s] initproj( [ 38s] "pkg_command_test_123-0.7", [ 38s] filedefs={ [ 38s] "tox.ini": """ [ 38s] [tox] [ 38s] envlist = py [ 38s] [ 38s] [testenv] [ 38s] commands_pre = python -c 'print("pre")' [ 38s] commands = python -c 'print("command")' [ 38s] commands_post = python -c 'print("post")' [ 38s] """ [ 38s] }, [ 38s] ) [ 38s] result = cmd() [ 38s] > result.assert_success() [ 38s] [ 38s] cmd = .run at 0x7fab390562f0> [ 38s] initproj = .initproj_ at 0x7fab39354ae8> [ 38s] mock_venv = OrderedDict([(140373367851608, .Resul t object at 0x7fab38ba0cf8>)]) [ 38s] result = RunResult(ret=1, args=, out= [ 38s] GLOB sdist-make: /tmp/pytest-of-abuild/pytest-8/test_command_prev_post_ok0/pkg_command_ te...bin/python3 -m pip install --no-deps -U .tox/.tmp/package/1/pkg_command_test_123-0.7.zip (e xited with code 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/unit/session/test_session.py:306: [ 38s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 38s] [ 38s] self = RunResult(ret=1, args=, out= [ 38s] GLOB sdist-make: /tmp/pytest-of-abuild/pytest-8/test_command_prev_post_ok0/pkg_command_ te...bin/python3 -m pip install --no-deps -U .tox/.tmp/package/1/pkg_command_test_123-0.7.zip (e xited with code 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] is_run_test_env = True [ 38s] [ 38s] def assert_success(self, is_run_test_env=True): [ 38s] msg = self.output() [ 38s] > assert self.ret == 0, msg [ 38s] E AssertionError: 1 [ 38s] E [ 38s] E GLOB sdist-make: /tmp/pytest-of-abuild/pytest-8/test_command_prev_post_ok0/pkg_ command_test_123/setup.py [ 38s] E py inst-nodeps: /tmp/pytest-of-abuild/pytest-8/test_command_prev_post_ok0/pkg_c ommand_test_123/.tox/.tmp/package/1/pkg_command_test_123-0.7.zip [ 38s] E WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPAT H in 'passenv' in your configuration. [ 38s] E ERROR: invocation failed (exit code 2), logfile: /tmp/pytest-of-abuild/pytest-8 /test_command_prev_post_ok0/pkg_command_test_123/.tox/py/log/py-0.log [ 38s] E ================================== log start ================================== = [ 38s] E action: py, msg: installpkg [ 38s] E cwd: /tmp/pytest-of-abuild/pytest-8/test_command_prev_post_ok0/pkg_command_test _123 [ 38s] E cmd: /usr/bin/python3 -m pip install --no-deps -U .tox/.tmp/package/1/pkg_comma nd_test_123-0.7.zip [ 38s] E [ 38s] E =================================== log end =================================== = [ 38s] E ___________________________________ summary ___________________________________ _ [ 38s] E ERROR: py: InvocationError for command /usr/bin/python3 -m pip install --no-d eps -U .tox/.tmp/package/1/pkg_command_test_123-0.7.zip (exited with code 2) [ 38s] [ 38s] is_run_test_env = True [ 38s] msg = '1\n\nGLOB sdist-make: /tmp/pytest-of-abuild/pytest-8/test_command_prev_po st_ok0/pkg_command_test_123/setup.py\npy ins...d /usr/bin/python3 -m pip install --no-deps -U .t ox/.tmp/package/1/pkg_command_test_123-0.7.zip (exited with code 2)\n' [ 38s] self = RunResult(ret=1, args=, out= [ 38s] GLOB sdist-make: /tmp/pytest-of-abuild/pytest-8/test_command_prev_post_ok0/pkg_command_ te...bin/python3 -m pip install --no-deps -U .tox/.tmp/package/1/pkg_command_test_123-0.7.zip (e xited with code 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILDROOT/python-tox-3.8.1-0.x86_64/usr/lib/python3.7/site-packag es/tox/_pytestplugin.py:188: AssertionError [ 38s] _________________ test_command_prev_fail_command_skip_post_run _________________ [ 38s] [ 38s] cmd = .run at 0x7fab392bc840> [ 38s] initproj = .initproj_ at 0x7fab392bc598> [ 38s] mock_venv = OrderedDict([(140373371415968, .Result object at 0x7fab38f06240>)]) [ 38s] [ 38s] def test_command_prev_fail_command_skip_post_run(cmd, initproj, mock_venv): [ 38s] initproj( [ 38s] "pkg_command_test_123-0.7", [ 38s] filedefs={ [ 38s] "tox.ini": """ [ 38s] [tox] [ 38s] envlist = py [ 38s] [ 38s] [testenv] [ 38s] commands_pre = python -c 'raise SystemExit(2)' [ 38s] commands = python -c 'print("command")' [ 38s] commands_post = python -c 'print("post")' [ 38s] """ [ 38s] }, [ 38s] ) [ 38s] result = cmd() [ 38s] result.assert_fail() [ 38s] expected = textwrap.dedent( [ 38s] """ [ 38s] py run-test-pre: commands[0] | python -c 'raise SystemExit(2)' [ 38s] ERROR: InvocationError for command {} -c 'raise SystemExit(2)' (exited with code 2) [ 38s] py run-test-post: commands[0] | python -c 'print("post")' [ 38s] post [ 38s] ___________________________________ summary ___________________________ ________{} [ 38s] ERROR: py: commands failed [ 38s] """.format( [ 38s] pipes.quote(sys.executable), "_" if sys.platform != "win32" else "" [ 38s] ) [ 38s] ) [ 38s] have = result.out.replace(os.linesep, "\n") [ 38s] actual = have[len(have) - len(expected) :] [ 38s] > assert actual == expected [ 38s] E assert 'est_123-0.7....ith code 2)\n' == '\npy run-test...ands failed\n' [ 38s] E - est_123-0.7.zip [ 38s] E [ 38s] E - =================================== log end =============================== ===== [ 38s] E + py run-test-pre: commands[0] | python -c 'raise SystemExit(2)' [ 38s] E + ERROR: InvocationError for command /usr/bin/python3 -c 'raise SystemExit(2) ' (exited with code 2) [ 38s] E + py run-test-post: commands[0] | python -c 'print("post")' [ 38s] E + post... [ 38s] E [ 38s] E ...Full output truncated (4 lines hidden), use '-vv' to show [ 38s] [ 38s] actual = 'est_123-0.7.zip\n\n=================================== log end ========== ==========================\n________________...d /usr/bin/python3 -m pip install --no-deps -U .t ox/.tmp/package/1/pkg_command_test_123-0.7.zip (exited with code 2)\n' [ 38s] cmd = .run at 0x7fab392bc840> [ 38s] expected = '\npy run-test-pre: commands[0] | python -c \'raise SystemExit(2)\'\nERROR : InvocationError for command /usr/bin/pytho...post\n___________________________________ summary ____________________________________\nERROR: py: commands failed\n' [ 38s] have = 'GLOB sdist-make: /tmp/pytest-of-abuild/pytest-8/test_command_prev_fail_co mmand0/pkg_command_test_123/setup.py\npy ins...d /usr/bin/python3 -m pip install --no-deps -U .t ox/.tmp/package/1/pkg_command_test_123-0.7.zip (exited with code 2)\n' [ 38s] initproj = .initproj_ at 0x7fab392bc598> [ 38s] mock_venv = OrderedDict([(140373371415968, .Resul t object at 0x7fab38f06240>)]) [ 38s] result = RunResult(ret=1, args=, out= [ 38s] GLOB sdist-make: /tmp/pytest-of-abuild/pytest-8/test_command_prev_fail_command0/pkg_com ma...bin/python3 -m pip install --no-deps -U .tox/.tmp/package/1/pkg_command_test_123-0.7.zip (e xited with code 2) [ 38s] [ 38s] , err= [ 38s] ) [ 38s] [ 38s] /home/abuild/rpmbuild/BUILD/tox-3.8.1/tests/unit/session/test_session.py:358: Assertion Error [ 38s] =========================== short test summary info ============================ [ 38s] FAIL tests/integration/test_provision_int.py::test_provision_missing [ 38s] FAIL tests/integration/test_provision_int.py::test_provision_interrupt_child [ 38s] FAIL tests/unit/test_venv.py::test_install_deps_wildcard [ 38s] FAIL tests/unit/test_venv.py::test_install_deps_indexserver [ 38s] FAIL tests/unit/test_venv.py::test_install_deps_pre [ 38s] FAIL tests/unit/test_venv.py::test_installpkg_indexserver [ 38s] FAIL tests/unit/test_venv.py::test_install_sdist_extras [ 38s] FAIL tests/unit/test_venv.py::test_develop_extras [ 38s] FAIL tests/unit/test_venv.py::test_install_python3 [ 38s] FAIL tests/unit/test_venv.py::TestVenvTest::()::test_pythonpath_remove [ 38s] FAIL tests/unit/test_venv.py::TestVenvTest::()::test_pythonpath_keep [ 38s] FAIL tests/unit/test_venv.py::TestVenvTest::()::test_pythonpath_empty [ 38s] FAIL tests/unit/test_venv.py::test_env_variables_added_to_pcall [ 38s] FAIL tests/unit/test_venv.py::test_installpkg_no_upgrade [ 38s] FAIL tests/unit/test_venv.py::test_install_command_verbosity[0-0] [ 38s] FAIL tests/unit/test_venv.py::test_install_command_verbosity[1-0] [ 38s] FAIL tests/unit/test_venv.py::test_install_command_verbosity[2-0] [ 38s] FAIL tests/unit/test_venv.py::test_install_command_verbosity[3-1] [ 38s] FAIL tests/unit/test_venv.py::test_install_command_verbosity[4-2] [ 38s] FAIL tests/unit/test_venv.py::test_install_command_verbosity[5-3] [ 38s] FAIL tests/unit/test_venv.py::test_install_command_verbosity[6-3] [ 38s] FAIL tests/unit/test_venv.py::test_installpkg_upgrade [ 38s] FAIL tests/unit/test_venv.py::test_run_install_command [ 38s] FAIL tests/unit/package/test_package.py::test_install_via_installpkg [ 38s] FAIL tests/unit/package/builder/test_package_builder_isolated.py::test_verbose_isolated _build [ 38s] FAIL tests/unit/package/builder/test_package_builder_isolated.py::test_dist_exists_vers ion_change [ 38s] FAIL tests/unit/session/test_session.py::test_command_prev_post_ok [ 38s] FAIL tests/unit/session/test_session.py::test_command_prev_fail_command_skip_post_run [ 38s] SKIP [1] tests/integration/test_jython_env_create.py:5: needs jython and dev cut of vir tualenv [ 38s] SKIP [1] tests/unit/test_interpreters.py:29: non posix test [ 38s] =============================== warnings summary =============================== [ 38s] /usr/lib/python3.7/site-packages/pathlib2/__init__.py:15 [ 38s] /usr/lib/python3.7/site-packages/pathlib2/__init__.py:15: DeprecationWarning: Using o r importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working [ 38s] from collections import Sequence [ 38s] [ 38s] -- Docs: https://docs.pytest.org/en/latest/warnings.html [ 38s] = 28 failed, 398 passed, 2 skipped, 23 deselected, 1 warnings in 31.93 seconds = ```
mcepl commented 5 years ago

OK, a correction: no idea why, but when I build both python2 and python3 version (in separate build directories), it is enough to have just:

%pytest -k 'not (network or parallel or test_provision_missing or test_provision_interrupt_child or test_workdir_gets_resolved)'

to have tests pass.

gaborbernat commented 5 years ago

That command disables those tests so now the test suite passes. This probably is a test suite only bug, I'm not expecting runtime effect.

asottile commented 5 years ago

@mcepl is this something we can reproduce in docker / etc. -- that would make it easier for us to debug

mcepl commented 5 years ago
  1. Use openSUSE/Tumbleweed images from https://hub.docker.com/r/opensuse/tumbleweed
  2. install osc
  3. osc checkout devel:languages:python python-tox
  4. osc build Does it work?
Docker Hub
asottile commented 5 years ago

I was able to get the tox testsuite passing inside the opensuse/tumbleweed image, maybe this'll help you debug your build?

(venv) e0bcf2a8404a:/tox # tox -e py37
.package create: /tox/.tox/.package
.package installdeps: setuptools >= 40.0.4, setuptools_scm >= 2.0.0, <4, wheel >= 0.29.0
py37 create: /tox/.tox/py37
py37 installdeps: pip == 19.1.1
py37 inst: /tox/.tox/.tmp/package/1/tox-3.12.2.dev1+g5a2b535.tar.gz
py37 installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.1.0,coverage==4.5.3,execnet==1.6.0,filelock==3.0.12,flaky==3.5.3,freezegun==0.3.11,more-itertools==7.0.0,pathlib2==2.3.3,pluggy==0.11.0,psutil==5.6.2,py==1.8.0,pytest==4.5.0,pytest-cov==2.7.1,pytest-forked==1.0.2,pytest-mock==1.10.4,pytest-randomly==1.2.3,pytest-xdist==1.28.0,python-dateutil==2.8.0,six==1.12.0,toml==0.10.0,tox==3.12.2.dev1+g5a2b535,virtualenv==16.6.0,wcwidth==0.1.7
py37 run-test-pre: PYTHONHASHSEED='3213873936'
py37 run-test: commands[0] | pytest --cov /tox/.tox/py37/lib/python3.7/site-packages/tox --cov-config /tox/tox.ini --junitxml /tox/.tox/junit.py37.xml -n=auto .
============================= test session starts ==============================
platform linux -- Python 3.7.2, pytest-4.5.0, py-1.8.0, pluggy-0.11.0
cachedir: .tox/py37/.pytest_cache
Using --randomly-seed=1558656965
tox comes from: '/tox/.tox/py37/lib/python3.7/site-packages/tox/__init__.py'
rootdir: /tox, inifile: tox.ini
plugins: xdist-1.28.0, randomly-1.2.3, mock-1.10.4, forked-1.0.2, cov-2.7.1, flaky-3.5.3
gw0 [536] / gw1 [536] / gw2 [536] / gw3 [536] / gw4 [536]
.........................................s.............................. [ 13%]
........................................................................ [ 26%]
........................................................................ [ 40%]
........................................................................ [ 53%]
........................................................................ [ 67%]
.......................................................s.....s.......... [ 80%]
........................................................................ [ 94%]
.ss.............................                                         [100%]
=============================== warnings summary ===============================
.tox/py37/lib/python3.7/site-packages/pathlib2/__init__.py:15
.tox/py37/lib/python3.7/site-packages/pathlib2/__init__.py:15
.tox/py37/lib/python3.7/site-packages/pathlib2/__init__.py:15
.tox/py37/lib/python3.7/site-packages/pathlib2/__init__.py:15
.tox/py37/lib/python3.7/site-packages/pathlib2/__init__.py:15
  /tox/.tox/py37/lib/python3.7/site-packages/pathlib2/__init__.py:15: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Sequence

-- Docs: https://docs.pytest.org/en/latest/warnings.html
----------------- generated xml file: /tox/.tox/junit.py37.xml -----------------

----------- coverage: platform linux, python 3.7.2-final-0 -----------
Name                                         Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------------------------------------
src/tox/__main__.py                              1      1      0      0     0%   1
src/tox/_pytestplugin.py                       341     29    102     13    89%   30, 32, 60, 87-94, 116, 127, 130-135, 169-170, 183, 216, 279, 297, 331-334, 29->30, 31->32, 59->60, 86->87, 115->116, 126->127, 128->130, 182->183, 194->exit, 213->216, 238->251, 294->297, 478->475
src/tox/_quickstart.py                         122     19     57      7    83%   76, 83, 91, 99, 116-128, 132-134, 275-277, 75->76, 82->83, 90->91, 98->99, 114->116, 176->186, 178->177
src/tox/action.py                              176     41     64      5    75%   117, 133, 151, 159-174, 179-189, 193-205, 242-244, 116->117, 131->133, 150->151, 239->242, 245->249
src/tox/cli.py                                   7      7      0      0     0%   1-11
src/tox/config/__init__.py                     993     15    371     19    98%   366, 850, 914, 1011, 1068, 1233, 1240, 1362, 1583-1584, 1595, 1603, 1660, 1674, 1709, 214->222, 365->366, 582->595, 849->850, 883->885, 913->914, 1007->1011, 1044->1048, 1067->1068, 1172->1168, 1232->1233, 1236->1240, 1361->1362, 1594->1595, 1602->1603, 1617->1627, 1659->1660, 1673->1674, 1690->1709
src/tox/config/parallel.py                      35      7      6      0    83%   17-22, 26-27
src/tox/exception.py                            40      1     10      0    94%   88
src/tox/helper/build_isolated.py                 9      9      2      0     0%   1-12
src/tox/helper/build_requires.py                10     10      2      0     0%   1-13
src/tox/interpreters/__init__.py                94     10     12      3    88%   49-51, 64-65, 76, 78, 81-82, 122, 75->76, 77->78, 121->122
src/tox/interpreters/py_spec.py                 49      9     16      6    77%   22, 28-29, 33, 35, 37, 39, 41, 43, 32->33, 34->35, 36->37, 38->39, 40->41, 42->43
src/tox/interpreters/unix.py                    13      1      4      1    88%   20, 19->20
src/tox/interpreters/via_path.py                45      5     18      3    87%   49, 65-66, 70-71, 25->18, 39->49, 62->70
src/tox/interpreters/windows/__init__.py        32     32     18      0     0%   1-51
src/tox/interpreters/windows/pep514.py         112    112     42      0     0%   2-161
src/tox/package/__init__.py                     53      4     16      2    91%   24-25, 49-50, 23->24, 45->53
src/tox/package/builder/isolated.py             66      1     27      2    97%   30, 27->29, 29->30
src/tox/package/local.py                        49      2     18      2    94%   44, 58, 43->44, 57->58
src/tox/package/view.py                         27      3     10      2    86%   36-37, 39, 32->38, 38->39
src/tox/reporter.py                            111      8     18      4    89%   29, 31, 81, 86-90, 28->29, 30->31, 48->50, 80->81
src/tox/session/__init__.py                    220      4     82      8    96%   73, 75, 149, 264, 72->73, 148->149, 230->228, 237->exit, 245->247, 263->264, 273->248, 279->281
src/tox/session/commands/provision.py           17      0      2      1    95%   23->exit
src/tox/session/commands/run/parallel.py        99     20     34      1    78%   72, 108-121, 128-139, 71->72
src/tox/session/commands/run/sequential.py      51      6     20      1    90%   30-32, 63-64, 72, 71->72
src/tox/util/graph.py                           48      0     40      1    99%   65->exit
src/tox/util/lock.py                            30      2      2      0    94%   37-38
src/tox/util/spinner.py                        127     13     44      8    88%   16-19, 133-137, 144-148, 15->16, 24->32, 55->exit, 93->97, 132->133, 138->exit, 143->144, 149->exit
src/tox/util/stdlib.py                          31     19      4      1    37%   9-14, 25-45, 21->25
src/tox/venv.py                                453     18    187     16    93%   102, 163, 183, 222-223, 256, 437, 513, 538, 565, 597-599, 604, 670, 699-703, 101->102, 177->180, 180->183, 221->222, 225->224, 226->225, 330->328, 436->437, 510->513, 535->499, 564->565, 596->597, 603->604, 669->670, 681->693, 698->699
----------------------------------------------------------------------------------------
TOTAL                                         3738    408   1292    106    88%

23 files skipped due to complete coverage.

=========================== short test summary info ============================
SKIPPED [1] tests/unit/test_z_cmdline.py:675: Platform doesnt support alwayscopy
SKIPPED [1] tests/unit/interpreters/windows/test_windows.py:4: non posix test
SKIPPED [1] tests/integration/test_jython_env_create.py:5: needs jython and dev cut of virtualenv
SKIPPED [1] tests/unit/interpreters/windows/test_pep514.py:17: non posix test
SKIPPED [1] tests/unit/interpreters/windows/test_pep514.py:10: non posix test
============= 531 passed, 5 skipped, 5 warnings in 119.14 seconds ==============
___________________________________ summary ____________________________________
  py37: commands succeeded
  congratulations :)

Here's the commands I ran, I filtered out all the unnecessary ones:

(venv) e0bcf2a8404a:/tox # history
    6  2019-05-24 00:10:45 zypper install git python3
   12  2019-05-24 00:13:04 git clone https://github.com/tox-dev/tox
   13  2019-05-24 00:13:11 zypper install curl
   14  2019-05-24 00:13:25 curl https://asottile.github.io/get-virtualenv.py | python3 - venv
   15  2019-05-24 00:13:31 cd tox/
   16  2019-05-24 00:13:34 . ../venv/bin/activate
   17  2019-05-24 00:13:36 pip install -e .
   19  2019-05-24 00:14:10 zypper  install gcc
   24  2019-05-24 00:15:29 zypper install python3-devel
   27  2019-05-24 00:15:45 tox -e py37
   28  2019-05-24 00:18:54 history
mcepl commented 5 years ago

This won't work, because openSUSE build system (as every build system on every Linux distro I know about) has no network connection inside of the system. So, pip install -e . is out of question (I have to explicitly list of build requirements, which will be installed from openSUSE packages).

Nevertheless, I tried to run tests tox to get closer to your scenario, and it didn't work, because apparently tox cannot be persuaded to stop bother with downloading packages from PyPI. With this script (and PYTHONPATH in passenv, notice there are no messages about overriding it):

export PYTHONDONTWRITEBYTECODE=1
export PATH=%{buildroot}%{_bindir}:$PATH
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}:%{$python_sitelib}
tox-%{$python_bin_suffix} --sitepackages -e py%{$python_version_nodots}
}

I get this failed tests:

[    4s] + export PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python-tox-3.12.1-0.x86_64/usr/l
ib/python2.7/site-packages:/usr/lib/python2.7/site-packages
[    4s] + PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python-tox-3.12.1-0.x86_64/usr/lib/pyth
on2.7/site-packages:/usr/lib/python2.7/site-packages
[    4s] + tox-2.7 --sitepackages -e py27
[    5s] .package create: /home/abuild/rpmbuild/BUILD/tox-3.12.1/.tox/.package
[    6s] .package installdeps: setuptools >= 40.0.4, setuptools_scm >= 2.0.0, <4, wheel >= 0.
29.0
[    7s] py27 create: /home/abuild/rpmbuild/BUILD/tox-3.12.1/.tox/py27
[    8s] py27 installdeps: pip == 19.1.1
[    8s] py27 inst: /home/abuild/rpmbuild/BUILD/tox-3.12.1/.tox/.tmp/package/1/tox-3.12.1.tar
.gz
[   16s] ERROR: invocation failed (exit code 1), logfile: /home/abuild/rpmbuild/BUILD/tox-3.1
2.1/.tox/py27/log/py27-2.log
[   16s] ================================== log start ===================================
[   16s] DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please
upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pi
p will drop support for Python 2.7.
[   16s] Processing ./.tox/.tmp/package/1/tox-3.12.1.tar.gz
[   16s]   Installing build dependencies: started
[   16s]   Installing build dependencies: finished with status 'error'
[   16s]   ERROR: Complete output from command /home/abuild/rpmbuild/BUILD/tox-3.12.1/.tox/py
27/bin/python /usr/lib/python2.7/site-packages/pip install --ignore-installed --no-user --pre
fix /tmp/pip-build-env-q36Kic/overlay --no-warn-script-location --no-binary :none: --only-bin
ary :none: -i https://pypi.org/simple -- 'setuptools >= 40.0.4' 'setuptools_scm >= 2.0.0, <4'
 'wheel >= 0.29.0':
[   16s]   DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Pleas
e upgrade your Python as Python 2.7 won't be maintained after that date. A future version of
pip will drop support for Python 2.7.
[   16s]   Collecting setuptools>=40.0.4
[   16s]     WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.Verif
iedHTTPSConnection object at 0x7f902fa20290>: Failed to establish a new connection: [Errno -3
] Temporary failure in name resolution',)': /simple/setuptools/
[   16s]     WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.Verif
iedHTTPSConnection object at 0x7f902fa202d0>: Failed to establish a new connection: [Errno -3
] Temporary failure in name resolution',)': /simple/setuptools/
[   16s]     WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.Verif
iedHTTPSConnection object at 0x7f902fa20210>: Failed to establish a new connection: [Errno -3
] Temporary failure in name resolution',)': /simple/setuptools/
[   16s]     WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.Verif
iedHTTPSConnection object at 0x7f902fa20dd0>: Failed to establish a new connection: [Errno -3
] Temporary failure in name resolution',)': /simple/setuptools/
[   16s]     WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status
=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.Verif
iedHTTPSConnection object at 0x7f902fa200d0>: Failed to establish a new connection: [Errno -3
] Temporary failure in name resolution',)': /simple/setuptools/
[   16s]     ERROR: Could not find a version that satisfies the requirement setuptools>=40.0.
4 (from versions: none)
[   16s]   ERROR: No matching distribution found for setuptools>=40.0.4
[   16s]   ----------------------------------------
[   16s] ERROR: Command "/home/abuild/rpmbuild/BUILD/tox-3.12.1/.tox/py27/bin/python /usr/lib
/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env
-q36Kic/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://
pypi.org/simple -- 'setuptools >= 40.0.4' 'setuptools_scm >= 2.0.0, <4' 'wheel >= 0.29.0'" fa
iled with error code 1 in None
[   16s]
[   16s] =================================== log end ====================================
[   16s] ___________________________________ summary ____________________________________
[   16s] ERROR:   py27: InvocationError for command /home/abuild/rpmbuild/BUILD/tox-3.12.1/.t
ox/py27/bin/python -m pip install --exists-action w '/home/abuild/rpmbuild/BUILD/tox-3.12.1/.
tox/.tmp/package/1/tox-3.12.1.tar.gz[testing]' (exited with code 1)

You can see from the full build log that python2-pip-19.1.1+git.1557777841.63878672-27.1 has been installed.

asottile commented 5 years ago

you can probably prebuild any wheels that it needs and set PIP_FIND_LINKS and PIP_NO_INDEX and TOX_TESTENV_PASSENV to make those variables pass through. This can make pip install work.

debian seems to have a successful build of tox, maybe look into how they packaged it?

mcepl commented 5 years ago

you can probably prebuild any wheels that it needs and set PIP_FIND_LINKS and PIP_NO_INDEX and TOX_TESTENV_PASSENV to make those variables pass through. This can make pip install work.

debian seems to have a successful build of tox, maybe look into how they packaged it?

And where do you take your idea that they actually run any tests? Quoting from https://salsa.debian.org/python-team/applications/tox/blob/master/debian/rules:

# The tests are not runnable during package build because many invoke the tox
# command line.  It's too much work to make the test suite run partially here
# because upstream always changes the mix.

The difference is that I am just an idiot who hasn't given up yet.

GitLab
debian/rules · master · Debian Python Team / PAPT / tox
tox packaging

Fedora is actually not doing much better than me (from https://src.fedoraproject.org/rpms/python-tox/blob/master/f/python-tox.spec):

mkdir .path
ln -s %{__python3} .path/python
ln -s /usr/bin/easy_install-%{python3_version} .path/easy_install
ln -s /usr/bin/pytest-%{python3_version} .path/pytest
ln -s /usr/bin/pip3 .path/pip
export PATH=$(pwd)/.path:%{buildroot}%{_bindir}:$PATH
export PYTHONPATH=%{buildroot}%{python3_sitelib}
export TOXENV=py%{python3_version_nodots}
export TOX_TESTENV_PASSENV="PATH TOX_TESTENV_PASSENV"
# TODO figure out why PEP517/518 tests and test_tox_parallel_build_safe won't pass
pytest-3 -n auto -k "not test_verbose_isolated_build and not test_tox_parallel_build_safe and not test_dist_exists_version_change"
rm -rf .path

Of course, neither of them use tox command itself.

asottile commented 5 years ago

apologies, I was only trying to help :(

mcepl commented 5 years ago

apologies, I was only trying to help :(

Me too, I am just unhappy with what feels to me like a bit patronising and very self-assured tone I get from many comments in this project. We (Linux packagers) are not only unplesant bugs, who need to be swept away. We try to help as well.

asottile commented 5 years ago

apologies, I was only trying to help :(

Me too, I am just unhappy with what feels to me like a bit patronising and very self-assured tone I get from many comments in this project.

tone is pretty difficult through text -- I usually just assume that the person on the other end is trying their best to help especially if they're doing the work for free. I'm sorry if we came across that way

gaborbernat commented 5 years ago

My suggestion is to create a tox plugin that automatically replaces pip with opensuse packages and virtual environments. I can help getting starting with this though I do lack knowledge of opensuse from within.

asottile commented 5 years ago

got the tests passing without network, maybe you can adapt this strategy to your packaging:

FROM opensuse/tumbleweed
RUN : \
    && zypper --non-interactive install \
        gcc \
        git \
        python3-devel \
        python3-virtualenv \
    && :
COPY . /code
ENV PATH=/venv/bin:$PATH
RUN virtualenv /venv -ppython3 && pip install -e /code
RUN : \
    && mkdir /dists \
    && pip wheel -w /dists/ \
        # tox itself and its test deps
        /code[testing] \
        # needed by tests
        flit poetry \
        # needed to build the virtualenv and install tox
        pip==19.1.1 wheel setuptools-scm \
    && pip wheel -w /dists/ \
        # tests with specific, duplicated dependencies
        setuptools==40.6.3 'setuptools-scm<3' tox==3.7.0 \
    # and one more
    && pip wheel -w /dists/ tox==3.12 \
    && :
ENV \
    PIP_NO_INDEX=1 \
    PIP_FIND_LINKS=file:///dists/ \
    TOX_TESTENV_PASSENV='PIP_NO_INDEX PIP_FIND_LINKS'
WORKDIR /code
$ docker build -t tox . && docker run --rm --net=none tox tox -e py37
...
============= 531 passed, 5 skipped, 2 warnings in 414.45 seconds ==============
___________________________________ summary ____________________________________
  py37: commands succeeded
  congratulations :)
mcepl commented 5 years ago

got the tests passing without network, maybe you can adapt this strategy to your packaging:

Thank you very much, I will test it this upcoming week.

jugmac00 commented 4 years ago

@mcepl Did you manage to test the Docker config?

May this issue be closed?

mcepl commented 4 years ago

@mcepl Did you manage to test the Docker config?

May this issue be closed?

@jugmac00 I have still a couple of questions:

  1. cp . /code … what is $PWD at that moment, what I actually copy to that subdirectory?
  2. It should work as well with python3 -mvenv, right? That pip wheel -w /dist/ pip wheel still needs a network connection, doesn’t it?