From 648d5421e987c74d772e19c143253e1ae9cae0eb Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 19 Aug 2011 17:57:52 +0200 Subject: fix warning check for commands to come from testenv --- CHANGELOG.txt | 8 +++++++- setup.py | 2 +- tests/test_venv.py | 2 +- tox/__init__.py | 2 +- tox/_venv.py | 8 +++++--- toxbootstrap.py | 2 +- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index aaa9b78..2d4ea6d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,10 +1,16 @@ +1.2.dev +----------------- + +- fix a problem with parsing {posargs} in tox commands (spotted by goodwill) +- fix the warning check for commands to be installed in testevironment + (thanks Michael Foord for reporting) + 1.1 ----------------- - fix issue5 - don't require argparse for python versions that have it - fix issue6 - recreate virtualenv if installing dependencies failed - fix issue3 - fix example on frontpage -- fix a problem with parsing {posargs} in tox commands (spotted by goodwill) - fix issue2 - warn if a test command does not come from the test environment - fixed/enhanced: except for initial install always call "-U diff --git a/setup.py b/setup.py index 40f9cda..99ca16a 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ def main(): description='virtualenv-based automation of test activities', long_description=long_description, url='http://codespeak.net/tox', - version='1.1', + version='1.2.dev2', license='GPLv2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff --git a/tests/test_venv.py b/tests/test_venv.py index 097439f..d4c564a 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -216,7 +216,7 @@ def test_install_command_not_installed(newmocksession, monkeypatch): """) venv = mocksession.getenv('python') venv.test() - mocksession.report.expect("warning", "*Forgot to*") + mocksession.report.expect("warning", "*test command found but not*") def test_install_python3(tmpdir, newmocksession): if not py.path.local.sysfind('python3.1'): diff --git a/tox/__init__.py b/tox/__init__.py index 92263a5..a36359b 100644 --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.1' +__version__ = '1.2.dev2' class exception: class Error(Exception): diff --git a/tox/_venv.py b/tox/_venv.py index 76ac764..c1efae0 100644 --- a/tox/_venv.py +++ b/tox/_venv.py @@ -260,10 +260,12 @@ class VirtualEnv(object): try: args[0] = self.getcommandpath(args[0]) if venv: - if not isinstance(args[0], py.path.local): + if not py.path.local(args[0]).relto(self.envconfig.envdir): self.session.report.warning( - "using '%s' not installed in testenv:\n" - " %s\nForgot to specify a dependency?" % (args[0], + "test command found but not installed in testenv\n" + " cmd: %s\n" + " env: %s\n" + "Maybe forgot to specify a dependency?" % (args[0], self.envconfig.envdir)) if log is None: log = self.path.ensure("log", dir=1) diff --git a/toxbootstrap.py b/toxbootstrap.py index 80d3ed5..17bf0c9 100644 --- a/toxbootstrap.py +++ b/toxbootstrap.py @@ -58,7 +58,7 @@ ToDo """ -__version__ = '1.1' +__version__ = '1.2.dev2' import sys import os -- cgit v1.2.1