diff options
author | holger krekel <holger@merlinux.eu> | 2015-11-26 14:54:53 +0100 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2015-11-26 14:54:53 +0100 |
commit | b7823bfad66e0236ac161bdf3badc685c55e9683 (patch) | |
tree | fb27dd1e67c86f1f5e3d904ce6dd9119bc6aacf2 | |
parent | 058389e60415838b0208743e840b8fca2c9aabaa (diff) | |
download | tox-b7823bfad66e0236ac161bdf3badc685c55e9683.tar.gz |
fix issue252: allow environment names with special characters.
Thanks Julien Castets for initial PR and patience.
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | tests/test_z_cmdline.py | 17 | ||||
-rw-r--r-- | tox/__init__.py | 2 | ||||
-rw-r--r-- | tox/session.py | 10 |
5 files changed, 27 insertions, 7 deletions
@@ -7,6 +7,9 @@ - fix issue289: fix build_sphinx target, thanks Barry Warsaw. +- fix issue252: allow environment names with special characters. + Thanks Julien Castets for initial PR and patience. + 2.2.1 ----- @@ -48,7 +48,7 @@ def main(): description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='2.3.0.dev1', + version='2.3.0.dev2', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff --git a/tests/test_z_cmdline.py b/tests/test_z_cmdline.py index 994d4ec..d589a1d 100644 --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -301,6 +301,23 @@ def test_unknown_dep(cmd, initproj): ]) +def test_venv_special_chars_issue252(cmd, initproj): + initproj("pkg123-0.7", filedefs={ + 'tests': {'test_hello.py': "def test_hello(): pass"}, + 'tox.ini': ''' + [tox] + envlist = special&&1 + [testenv:special&&1] + changedir=tests + ''' + }) + result = cmd.run("tox", ) + assert result.ret == 0 + result.stdout.fnmatch_lines([ + "*installed*pkg123*" + ]) + + def test_unknown_environment(cmd, initproj): initproj("env123-0.7", filedefs={ 'tox.ini': '' diff --git a/tox/__init__.py b/tox/__init__.py index 837768c..443ce8f 100644 --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '2.3.0.dev1' +__version__ = '2.3.0.dev2' from .hookspecs import hookspec, hookimpl # noqa diff --git a/tox/session.py b/tox/session.py index b5176f9..f4214cf 100644 --- a/tox/session.py +++ b/tox/session.py @@ -533,11 +533,11 @@ class Session: action = self.newaction(venv, "envreport") with action: pip = venv.getcommandpath("pip") - # we can't really call internal helpers here easily :/ - # output = venv._pcall([str(pip), "freeze"], - # cwd=self.config.toxinidir, - # action=action) - output = py.process.cmdexec("%s freeze" % (pip)) + output = venv._pcall([str(pip), "freeze"], + cwd=self.config.toxinidir, + action=action) + # the output contains a mime-header, skip it + output = output.split("\n\n")[-1] packages = output.strip().split("\n") action.setactivity("installed", ",".join(packages)) envlog = self.resultlog.get_envlog(venv.name) |