2 new commits in tox:
https://bitbucket.org/hpk42/tox/commits/09fd6a94e281/
Changeset: 09fd6a94e281
User: hpk42
Date: 2015-06-23 11:49:40+00:00
Summary: some fixes for detox, preparing 2.1.1
Affected #: 7 files
diff -r fb8ff963c77a5e9189559597cf45cca2a88c03a0 -r
09fd6a94e2812f6cdfddfc6979be9b481af802a3 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,10 @@
+2.1.1
+----------
+
+- fix platform skipping for detox
+
+- report skipped platforms as skips in the summary
+
2.1.0
----------
diff -r fb8ff963c77a5e9189559597cf45cca2a88c03a0 -r
09fd6a94e2812f6cdfddfc6979be9b481af802a3 setup.py
--- a/setup.py
+++ b/setup.py
@@ -48,7 +48,7 @@
description='virtualenv-based automation of test activities',
long_description=open("README.rst").read(),
url='http://tox.testrun.org/',
- version='2.1.0',
+ version='2.1.1',
license='http://opensource.org/licenses/MIT',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
author='holger krekel',
diff -r fb8ff963c77a5e9189559597cf45cca2a88c03a0 -r
09fd6a94e2812f6cdfddfc6979be9b481af802a3 tests/test_venv.py
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -473,31 +473,24 @@
class TestVenvTest:
- def test_patchPATH(self, newmocksession, monkeypatch):
+ def test_envbinddir_path(self, newmocksession, monkeypatch):
monkeypatch.setenv("PIP_RESPECT_VIRTUALENV", "1")
mocksession = newmocksession([], """
[testenv:python]
commands=abc
""")
venv = mocksession.getenv("python")
- envconfig = venv.envconfig
monkeypatch.setenv("PATH", "xyz")
- oldpath = venv.patchPATH()
- assert oldpath == "xyz"
- res = os.environ['PATH']
- assert res == "%s%sxyz" % (envconfig.envbindir, os.pathsep)
- p = "xyz" + os.pathsep + str(envconfig.envbindir)
- monkeypatch.setenv("PATH", p)
- venv.patchPATH()
- res = os.environ['PATH']
- assert res == "%s%s%s" % (envconfig.envbindir, os.pathsep, p)
+ l = []
+ monkeypatch.setattr("py.path.local.sysfind", classmethod(
+ lambda *args, **kwargs: l.append(kwargs) or 0 / 0))
- assert envconfig.commands
- monkeypatch.setattr(venv, '_pcall', lambda *args, **kwargs: 0 / 0)
py.test.raises(ZeroDivisionError, "venv._install(list('123'))")
+ assert l.pop()["paths"] == [venv.envconfig.envbindir]
py.test.raises(ZeroDivisionError, "venv.test()")
+ assert l.pop()["paths"] == [venv.envconfig.envbindir]
py.test.raises(ZeroDivisionError, "venv.run_install_command(['qwe'])")
- py.test.raises(ZeroDivisionError, "venv._pcall([1,2,3])")
+ assert l.pop()["paths"] == [venv.envconfig.envbindir]
monkeypatch.setenv("PIP_RESPECT_VIRTUALENV", "1")
monkeypatch.setenv("PIP_REQUIRE_VIRTUALENV", "1")
monkeypatch.setenv("__PYVENV_LAUNCHER__", "1")
diff -r fb8ff963c77a5e9189559597cf45cca2a88c03a0 -r
09fd6a94e2812f6cdfddfc6979be9b481af802a3 tests/test_z_cmdline.py
--- a/tests/test_z_cmdline.py
+++ b/tests/test_z_cmdline.py
@@ -263,12 +263,9 @@
})
result = cmd.run("tox")
assert not result.ret
- assert "platform mismatch" not in result.stdout.str()
- result = cmd.run("tox", "-v")
- assert not result.ret
- result.stdout.fnmatch_lines([
- "*python*platform mismatch*"
- ])
+ result.stdout.fnmatch_lines("""
+ SKIPPED*platform mismatch*
+ """)
def test_skip_unknown_interpreter(cmd, initproj):
diff -r fb8ff963c77a5e9189559597cf45cca2a88c03a0 -r
09fd6a94e2812f6cdfddfc6979be9b481af802a3 tox/__init__.py
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -1,5 +1,5 @@
#
-__version__ = '2.1.0'
+__version__ = '2.1.1'
from .hookspecs import hookspec, hookimpl # noqa
diff -r fb8ff963c77a5e9189559597cf45cca2a88c03a0 -r
09fd6a94e2812f6cdfddfc6979be9b481af802a3 tox/session.py
--- a/tox/session.py
+++ b/tox/session.py
@@ -421,6 +421,9 @@
path.ensure(dir=1)
def setupenv(self, venv):
+ if not venv.matching_platform():
+ venv.status = "platform mismatch"
+ return # we simply omit non-matching platforms
action = self.newaction(venv, "getenv", venv.envconfig.envdir)
with action:
venv.status = 0
@@ -518,9 +521,6 @@
if self.config.option.sdistonly:
return
for venv in self.venvlist:
- if not venv.matching_platform():
- venv.status = "platform mismatch"
- continue # we simply omit non-matching platforms
if self.setupenv(venv):
if venv.envconfig.usedevelop:
self.developpkg(venv, self.config.setupdir)
@@ -569,7 +569,7 @@
self.report.error(msg)
elif status == "platform mismatch":
msg = " %s: %s" % (venv.envconfig.envname, str(status))
- self.report.verbosity1(msg)
+ self.report.skip(msg)
elif status and status != "skipped tests":
msg = " %s: %s" % (venv.envconfig.envname, str(status))
self.report.error(msg)
diff -r fb8ff963c77a5e9189559597cf45cca2a88c03a0 -r
09fd6a94e2812f6cdfddfc6979be9b481af802a3 tox/venv.py
--- a/tox/venv.py
+++ b/tox/venv.py
@@ -366,21 +366,13 @@
os.environ.pop(name, None)
cwd.ensure(dir=1)
- old = self.patchPATH()
- try:
- args[0] = self.getcommandpath(args[0], venv, cwd)
- env = self._getenv(testcommand=testcommand)
- return action.popen(args, cwd=cwd, env=env,
- redirect=redirect, ignore_ret=ignore_ret)
- finally:
- os.environ['PATH'] = old
-
- def patchPATH(self):
- oldPATH = os.environ['PATH']
+ args[0] = self.getcommandpath(args[0], venv, cwd)
+ env = self._getenv(testcommand=testcommand)
bindir = str(self.envconfig.envbindir)
- os.environ['PATH'] = os.pathsep.join([bindir, oldPATH])
- self.session.report.verbosity2("setting PATH=%s" % os.environ["PATH"])
- return oldPATH
+ env['PATH'] = p = os.pathsep.join([bindir, os.environ["PATH"]])
+ self.session.report.verbosity2("setting PATH=%s" % p)
+ return action.popen(args, cwd=cwd, env=env,
+ redirect=redirect, ignore_ret=ignore_ret)
def getdigest(path):
https://bitbucket.org/hpk42/tox/commits/87a9def32696/
Changeset: 87a9def32696
User: hpk42
Date: 2015-06-23 11:49:45+00:00
Summary: Added tag 2.1.1 for changeset 09fd6a94e281
Affected #: 1 file
diff -r 09fd6a94e2812f6cdfddfc6979be9b481af802a3 -r
87a9def32696f7ada3b536621f723018ce9667ad .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -27,3 +27,4 @@
2897c9e3a019ee29948cbeda319ffac0e6902053 2.0.1
82561ff2cbf48d8bf5be1384f5f3bd04c805fd30 2.0.2
25c76c46dbdd91126d2c6696cc1b4e97db6588f6 2.1.0
+09fd6a94e2812f6cdfddfc6979be9b481af802a3 2.1.1
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.
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit