summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2013-06-22 09:17:14 +0200
committerholger krekel <holger@merlinux.eu>2013-06-22 09:17:14 +0200
commit208b49a4269a258043150b5b47f62236accff270 (patch)
tree3910b16b425d21e7a9dfd89ea27eae2780d47df1
parentba3caa0dc99f4d62b71a2a49cd32873d1f60d1dc (diff)
downloadtox-208b49a4269a258043150b5b47f62236accff270.tar.gz
fix whitelist_externals on windows, bump version for release prep1.5.0
-rw-r--r--doc/conf.py2
-rw-r--r--setup.py4
-rw-r--r--tests/test_config.py2
-rw-r--r--tox.ini8
-rw-r--r--tox/__init__.py2
-rw-r--r--tox/_venv.py18
-rw-r--r--toxbootstrap.py2
7 files changed, 22 insertions, 16 deletions
diff --git a/doc/conf.py b/doc/conf.py
index c6e55ed..f643b48 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -48,7 +48,7 @@ copyright = u'2013, holger krekel and others'
# built documents.
#
# The short X.Y version.
-release = version = "1.4.3"
+release = version = "1.5.0"
# The full version, including alpha/beta/rc tags.
# The language for content autogenerated by Sphinx. Refer to documentation
diff --git a/setup.py b/setup.py
index b7534d2..095275f 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ class Tox(TestCommand):
def main():
version = sys.version_info[:2]
- install_requires = ['virtualenv>=1.9.1', 'py>=1.4.13', ]
+ install_requires = ['virtualenv>=1.9.1', 'py>=1.4.15', ]
if version < (2, 7) or (3, 0) <= version <= (3, 1):
install_requires += ['argparse']
setup(
@@ -26,7 +26,7 @@ def main():
description='virtualenv-based automation of test activities',
long_description=open("README.rst").read(),
url='http://tox.testrun.org/',
- version='1.5.dev12',
+ version='1.5.0',
license='http://opensource.org/licenses/MIT',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
author='holger krekel',
diff --git a/tests/test_config.py b/tests/test_config.py
index 159f555..037fc26 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -894,8 +894,6 @@ class TestCmdInvocation:
*docs*
""")
- @py.test.mark.xfail("sys.version_info < (2,6)",
- reason="virtualenv3 cannot be imported")
def test_config_specific_ini(self, tmpdir, cmd):
ini = tmpdir.ensure("hello.ini")
result = cmd.run("tox", "-c", ini, "--showconfig")
diff --git a/tox.ini b/tox.ini
index 05be67a..d5d77d0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,20 +1,18 @@
[tox]
envlist=py27,py26,py25,py32,py33,docs,pypy
-indexserver =
- testrun = http://pypi.testrun.org
- pypi = https://pypi.python.org/simple
[testenv:X]
commands=echo {posargs}
[testenv]
-commands=py.test --junitxml={envlogdir}/junit-{envname}.xml {posargs}
+commands=py.test --instafail --junitxml={envlogdir}/junit-{envname}.xml {posargs}
deps=pytest==2.3.4
+ pytest-instafail
[testenv:docs]
basepython=python
changedir=doc
-deps=:pypi:sphinx
+deps=sphinx
{[testenv]deps}
commands=
py.test -v \
diff --git a/tox/__init__.py b/tox/__init__.py
index ead3e2b..02f0744 100644
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -1,5 +1,5 @@
#
-__version__ = '1.5.dev12'
+__version__ = '1.5.0'
class exception:
class Error(Exception):
diff --git a/tox/_venv.py b/tox/_venv.py
index 37fc96f..5008c00 100644
--- a/tox/_venv.py
+++ b/tox/_venv.py
@@ -83,11 +83,9 @@ class VirtualEnv(object):
if p is None:
raise tox.exception.InvocationError(
"could not find executable %r" % (name,))
+ # p is not found in virtualenv script/bin dir
if venv:
- for x in self.envconfig.whitelist_externals:
- if p.fnmatch(x):
- break
- else:
+ if not self.is_allowed_external(p):
self.session.report.warning(
"test command found but not installed in testenv\n"
" cmd: %s\n"
@@ -96,6 +94,18 @@ class VirtualEnv(object):
self.envconfig.envdir))
return str(p) # will not be rewritten for reporting
+ def is_allowed_external(self, p):
+ tryadd = [""]
+ if sys.platform == "win32":
+ tryadd += [os.path.normcase(x)
+ for x in os.environ['PATHEXT'].split(os.pathsep)]
+ p = py.path.local(os.path.normcase(str(p)))
+ for x in self.envconfig.whitelist_externals:
+ for add in tryadd:
+ if p.fnmatch(x + add):
+ return True
+ return False
+
def _ispython3(self):
return "python3" in str(self.envconfig.basepython)
diff --git a/toxbootstrap.py b/toxbootstrap.py
index dbfac24..37ddef5 100644
--- a/toxbootstrap.py
+++ b/toxbootstrap.py
@@ -58,7 +58,7 @@ ToDo
"""
-__version__ = '1.5.dev12'
+__version__ = '1.5.0'
import sys
import os