[Pytest-commit] commit/tox: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Aug 14 10:02:35 CEST 2013
3 new commits in tox:
https://bitbucket.org/hpk42/tox/commits/ffb519dcbb6e/
Changeset: ffb519dcbb6e
User: hpk42
Date: 2013-08-14 09:59:02
Summary: fix issue1: empty setup files are properly detected
Affected #: 1 file
diff -r 4414956b0a64281d79e3fcd986516df154f6efe1 -r ffb519dcbb6ea0ebdf3339dfa10d4ce6a6df6457 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
1.6.0.dev
-----------------
+- fix issue1: empty setup files are properly detected
+
- during installation of dependencies HOME is set to a pseudo
location (envtmpdir/pseudo-home). If an index url was specified
a .pydistutils.cfg file will be written so that index_url
https://bitbucket.org/hpk42/tox/commits/182e8f03b686/
Changeset: 182e8f03b686
User: hpk42
Date: 2013-08-14 09:59:14
Summary: fix issue1: empty setup files are properly detected, thanks Anthon van
der Neuth
Affected #: 1 file
diff -r ffb519dcbb6ea0ebdf3339dfa10d4ce6a6df6457 -r 182e8f03b6865117f8191035cc95a0865bacfb92 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,8 @@
1.6.0.dev
-----------------
-- fix issue1: empty setup files are properly detected
+- fix issue1: empty setup files are properly detected, thanks Anthon van
+ der Neuth
- during installation of dependencies HOME is set to a pseudo
location (envtmpdir/pseudo-home). If an index url was specified
https://bitbucket.org/hpk42/tox/commits/9fd1946709d3/
Changeset: 9fd1946709d3
User: hpk42
Date: 2013-08-14 09:59:16
Summary: ref pull request 65
make tox run its tests against python2.5 as well
vendor virtualenv as 'virtualenv.py' instead of 'virtualenv-1.9.1.py'
which triggers some weird logic preventing tox to run its tests on
itself.
Affected #: 9 files
diff -r 182e8f03b6865117f8191035cc95a0865bacfb92 -r 9fd1946709d37f4ee04ea6159e730096bf9ad87c setup.py
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
author='holger krekel',
author_email='holger at merlinux.eu',
- packages=['tox', ],
+ packages=['tox', 'tox.vendor'],
entry_points={'console_scripts': 'tox=tox:cmdline\ntox-quickstart=tox._quickstart:main'},
# we use a public tox version to test, see tox.ini's testenv
# "deps" definition for the required dependencies
diff -r 182e8f03b6865117f8191035cc95a0865bacfb92 -r 9fd1946709d37f4ee04ea6159e730096bf9ad87c tests/test_venv.py
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -6,6 +6,8 @@
from tox._venv import find_executable
from tox._venv import _getinterpreterversion
+py25calls = int(sys.version_info[:2] == (2,5))
+
#def test_global_virtualenv(capfd):
# v = VirtualEnv()
# l = v.list()
@@ -98,7 +100,7 @@
l = mocksession._pcalls
assert len(l) >= 1
args = l[0].args
- assert str(args[1]).endswith("virtualenv.py")
+ assert "virtualenv" in str(args[1])
if sys.platform != "win32":
# realpath is needed for stuff like the debian symlinks
assert py.path.local(sys.executable).realpath() == args[0]
@@ -173,15 +175,15 @@
venv = mocksession.getenv("py123")
venv.create()
l = mocksession._pcalls
- assert len(l) == 1
+ assert len(l) == 1 + py25calls
distshare = venv.session.config.distshare
distshare.ensure("dep1-1.0.zip")
distshare.ensure("dep1-1.1.zip")
venv.install_deps()
- assert len(l) == 2
- args = l[1].args
- assert l[1].cwd == venv.envconfig.envlogdir
+ assert len(l) == 2 + py25calls
+ args = l[-1].args
+ assert l[-1].cwd == venv.envconfig.envlogdir
assert "pip" in str(args[0])
assert args[1] == "install"
#arg = "--download-cache=" + str(venv.envconfig.downloadcache)
@@ -206,12 +208,12 @@
venv = mocksession.getenv("py123")
venv.create()
l = mocksession._pcalls
- assert len(l) == 1
+ assert len(l) == 1 + py25calls
venv.install_deps()
- assert len(l) == 2
- args = l[1].args
- assert l[1].cwd == venv.envconfig.envlogdir
+ assert len(l) == 2 + py25calls
+ args = l[-1].args
+ assert l[-1].cwd == venv.envconfig.envlogdir
assert "pip" in str(args[0])
assert args[1] == "install"
assert "dep1" in args
@@ -234,7 +236,7 @@
venv = mocksession.getenv('py123')
venv.create()
l = mocksession._pcalls
- assert len(l) == 1
+ assert len(l) == 1 + py25calls
l[:] = []
venv.install_deps()
diff -r 182e8f03b6865117f8191035cc95a0865bacfb92 -r 9fd1946709d37f4ee04ea6159e730096bf9ad87c tests/test_z_cmdline.py
--- a/tests/test_z_cmdline.py
+++ b/tests/test_z_cmdline.py
@@ -3,9 +3,18 @@
import pytest
import sys
from tox._pytestplugin import ReportExpectMock
+try:
+ import json
+except ImportError:
+ import simplejson as json
pytest_plugins = "pytester"
+if sys.version_info < (2,6):
+ PIP_INSECURE = "setenv = PIP_INSECURE=1"
+else:
+ PIP_INSECURE = ""
+
from tox._cmdline import Session
from tox._config import parseconfig
@@ -356,6 +365,8 @@
"*InvocationError*",
])
+
+
class TestToxRun:
@pytest.fixture
def example123(self, initproj):
@@ -368,9 +379,10 @@
'tox.ini': '''
[testenv]
changedir=tests
+ %s
commands= py.test --basetemp={envtmpdir} --junitxml=junit-{envname}.xml
deps=pytest
- '''
+ ''' % PIP_INSECURE
})
def test_toxuone_env(self, cmd, example123):
@@ -407,7 +419,7 @@
jsonpath = cmd.tmpdir.join("res.json")
result = cmd.run("tox", "--result-json", jsonpath)
assert result.ret == 1
- data = py.std.json.load(jsonpath.open("r"))
+ data = json.load(jsonpath.open("r"))
verify_json_report_format(data)
result.stdout.fnmatch_lines([
"*1 failed*",
@@ -461,10 +473,11 @@
[testenv]
usedevelop=True
changedir=tests
+ %s
commands=
py.test --basetemp={envtmpdir} --junitxml=junit-{envname}.xml []
deps=pytest
- '''
+ ''' % PIP_INSECURE
})
result = cmd.run("tox", "-v")
assert not result.ret
diff -r 182e8f03b6865117f8191035cc95a0865bacfb92 -r 9fd1946709d37f4ee04ea6159e730096bf9ad87c tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist=py27,py26,py32,py33,pypy
+envlist=py25,py27,py26,py32,py33,pypy
[testenv:X]
commands=echo {posargs}
diff -r 182e8f03b6865117f8191035cc95a0865bacfb92 -r 9fd1946709d37f4ee04ea6159e730096bf9ad87c tox/_cmdline.py
--- a/tox/_cmdline.py
+++ b/tox/_cmdline.py
@@ -506,8 +506,12 @@
def info_versions(self):
versions = ['tox-%s' % tox.__version__]
- version = py.process.cmdexec("virtualenv --version")
- versions.append("virtualenv-%s" % version.strip())
+ try:
+ version = py.process.cmdexec("virtualenv --version")
+ except py.process.cmdexec.Error:
+ versions.append("virtualenv-1.9.1 (vendored)")
+ else:
+ versions.append("virtualenv-%s" % version.strip())
self.report.keyvalue("tool-versions:", " ".join(versions))
diff -r 182e8f03b6865117f8191035cc95a0865bacfb92 -r 9fd1946709d37f4ee04ea6159e730096bf9ad87c tox/_venv.py
--- a/tox/_venv.py
+++ b/tox/_venv.py
@@ -181,7 +181,8 @@
if action is None:
action = self.session.newaction(self, "create")
config_interpreter = self.getsupportedinterpreter()
- config_interpreter_version = _getinterpreterversion(config_interpreter)
+ config_interpreter_version = _getinterpreterversion(
+ config_interpreter)
use_venv191 = config_interpreter_version < '2.6'
use_pip13 = config_interpreter_version < '2.6'
if not use_venv191:
@@ -189,15 +190,17 @@
f.close()
venvscript = path.rstrip("co")
else:
- venvscript = py.path.local(tox.__file__).dirpath("virtualenv-1.9.1.py")
- args = [config_interpreter, venvscript]
+ venvscript = py.path.local(tox.__file__).dirpath(
+ "vendor", "virtualenv.py")
+ args = [config_interpreter, str(venvscript)]
if self.envconfig.distribute:
args.append("--distribute")
else:
args.append("--setuptools")
if self.envconfig.sitepackages:
args.append('--system-site-packages')
- # add interpreter explicitly, to prevent using default (virtualenv.ini)
+ # add interpreter explicitly, to prevent using
+ # default (virtualenv.ini)
args.extend(['--python', str(config_interpreter)])
#if sys.platform == "win32":
# f, path, _ = py.std.imp.find_module("virtualenv")
@@ -214,8 +217,10 @@
indexserver = self.envconfig.config.indexserver['default'].url
action = self.session.newaction(self, "pip_downgrade")
action.setactivity('pip-downgrade', 'pip<1.4')
- argv = ["easy_install"] + self._commoninstallopts(indexserver) + ['pip<1.4']
- self._pcall(argv, cwd=self.envconfig.envlogdir, action=action)
+ argv = ["easy_install"] + \
+ self._installopts(indexserver) + ['pip<1.4']
+ self._pcall(argv, cwd=self.envconfig.envlogdir,
+ action=action)
def finish(self):
self._getliveconfig().writeconfig(self.path_config)
diff -r 182e8f03b6865117f8191035cc95a0865bacfb92 -r 9fd1946709d37f4ee04ea6159e730096bf9ad87c tox/vendor/__init__.py
--- /dev/null
+++ b/tox/vendor/__init__.py
@@ -0,0 +1,1 @@
+#
This diff is so big that we needed to truncate the remainder.
Repository URL: https://bitbucket.org/hpk42/tox/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list