1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/638b892f6fad/ Changeset: 638b892f6fad User: hpk42 Date: 2013-05-21 16:46:31 Summary: make sure virtualenv commands are found first Affected #: 10 files
diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ 1.5.0.dev ----------------- +- make sure test commands are searched first in the virtualenv + +- rename README.txt to README.rst to make bitbucket happier + - re-fix issue2 - add command_whitelist to be used in ``[testenv*]`` sections, allowing to avoid warnings for commands such as ``make``, used from the commands value. diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb README.rst --- /dev/null +++ b/README.rst @@ -0,0 +1,22 @@ + +What is Tox? +-------------------- + +Tox as is a generic virtualenv_ management and test command line tool you can use for: + +* checking your package installs correctly with different Python versions and + interpreters + +* running your tests in each of the environments, configuring your test tool of choice + +* acting as a frontend to Continuous Integration servers, greatly + reducing boilerplate and merging CI and shell-based testing. + +For more information, docs and many examples please checkout: + + http://tox.testrun.org + +have fun, + +holger krekel, May 2013 + diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb README.txt --- a/README.txt +++ /dev/null @@ -1,22 +0,0 @@ - -What is Tox? --------------------- - -Tox as is a generic virtualenv_ management and test command line tool you can use for: - -* checking your package installs correctly with different Python versions and - interpreters - -* running your tests in each of the environments, configuring your test tool of choice - -* acting as a frontend to Continuous Integration servers, greatly - reducing boilerplate and merging CI and shell-based testing. - -For more information, docs and many examples please checkout: - - http://tox.testrun.org - -have fun, - -holger krekel, May 2012 - diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -83,7 +83,7 @@ unix ``make`` for running tests you can list ``whitelist_externals=make`` or ``whitelist_externals=/usr/bin/make`` if you want more precision. If you don't want tox to issue a warning in any case, just use - ``whitelist_externals=*`` which will match all commands (not recommended). + ``whitelist_externals=*`` which will match all commands (not recommended). .. confval:: changedir=path diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb setup.py --- a/setup.py +++ b/setup.py @@ -2,29 +2,6 @@ from setuptools import setup from setuptools.command.test import test as TestCommand -long_description = """ -What is Tox? -========================== - -Tox as is a generic virtualenv management and test command line tool you can -use for: - -* checking your package installs correctly with different - Python versions and interpreters - -* running your tests in each of the - environments, configuring your test tool of choice - -* acting as a frontend to Continuous Integration - servers, greatly reducing boilerplate and merging - CI and shell-based testing. - -For more information, docs and many examples please checkout the `home page`_: - - http://tox.testrun.org/ - -.. _`home page`: http://tox.testrun.org/ -""" class Tox(TestCommand): @@ -47,9 +24,9 @@ setup( name='tox', description='virtualenv-based automation of test activities', - long_description=long_description, + long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.5.dev9', + version='1.5.dev11', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -102,6 +102,20 @@ assert interp == venv.getconfigexecutable() assert venv.path_config.check(exists=False) +@pytest.mark.skipif("sys.platform == 'win32'") +def test_commandpath_venv_precendence(tmpdir, monkeypatch, + mocksession, newconfig): + config = newconfig([], """ + [testenv:py123] + """) + envconfig = config.envconfigs['py123'] + venv = VirtualEnv(envconfig, session=mocksession) + tmpdir.ensure("easy_install") + monkeypatch.setenv("PATH", str(tmpdir), prepend=os.pathsep) + envconfig.envbindir.ensure("easy_install") + p = venv.getcommandpath("easy_install") + assert py.path.local(p).relto(envconfig.envbindir), p + def test_create_distribute(monkeypatch, mocksession, newconfig): config = newconfig([], """ [testenv:py123] diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb tests/test_z_cmdline.py --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -2,7 +2,7 @@ import py import pytest import sys -from conftest import ReportExpectMock +from tox._pytestplugin import ReportExpectMock pytest_plugins = "pytester" diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.5.dev9' +__version__ = '1.5.dev11' class exception: class Error(Exception): diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -74,12 +74,15 @@ p = cwd.join(name) if p.check(): return str(p) + p = None + if venv: + p = py.path.local.sysfind(name, paths=[self.envconfig.envbindir]) + if p is not None: + return p p = py.path.local.sysfind(name) if p is None: - raise tox.exception.InvocationError("could not find executable %r" - % (name,)) - if p.relto(self.envconfig.envdir): - return p + raise tox.exception.InvocationError( + "could not find executable %r" % (name,)) if venv: for x in self.envconfig.whitelist_externals: if p.fnmatch(x): diff -r 8d323c83d4d87511dd8fc12652b32d8cf9b5409e -r 638b892f6fadcbacbb31168c889827171a6a54eb toxbootstrap.py --- a/toxbootstrap.py +++ b/toxbootstrap.py @@ -58,7 +58,7 @@ """ -__version__ = '1.5.dev9' +__version__ = '1.5.dev11' import sys import os 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 pytest-commit@python.org http://mail.python.org/mailman/listinfo/pytest-commit