Commits

holger krekel committed 8fcc1be

fix whitelist_externals on windows, bump version for release prep

Comments (0)

Files changed (7)

 # 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
 
 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(
         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',

tests/test_config.py

             *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")
 [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 \
 #
-__version__ = '1.5.dev12'
+__version__ = '1.5.0'
 
 class exception:
     class Error(Exception):
         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"
                     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)
 
 
 """
 
-__version__ = '1.5.dev12'
+__version__ = '1.5.0'
 
 import sys
 import os
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.