summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2015-11-20 22:36:39 +0100
committerholger krekel <holger@merlinux.eu>2015-11-20 22:36:39 +0100
commit4934b5fdd8e5517b1dc781bd6590d61d0d5b395b (patch)
tree2fe3ed860078642febb2691700153d67cce0cc16
parent29861cd9565db7f47d6e40e1245c12c2744e6bcf (diff)
parent65e64d4e24af25e0df927aa88ef427e6c2333f50 (diff)
downloadtox-4934b5fdd8e5517b1dc781bd6590d61d0d5b395b.tar.gz
merge default
-rw-r--r--CHANGELOG11
-rw-r--r--setup.cfg2
-rw-r--r--setup.py2
-rw-r--r--tests/test_config.py28
-rw-r--r--tox/__init__.py2
-rw-r--r--tox/config.py4
6 files changed, 36 insertions, 13 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 6e95ce8..f3b30ec 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,15 @@
-2.2.2.dev
----------
+2.3.0 (unreleased)
+-----
- fix issue285 (WIP) setenv processing with self-references
+- allow "#" in commands. This is slightly incompatible with commands
+ sections that used a comment after a "\" line continuation.
+ Thanks David Stanek for the PR.
+
+- fix issue289: fix build_sphinx target, thanks Barry Warsaw.
+
+
2.2.1
-----
diff --git a/setup.cfg b/setup.cfg
index 1ab4fd0..fcf263d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[build_sphinx]
-source-dir = doc/en/
+source-dir = doc/
build-dir = doc/build
all_files = 1
diff --git a/setup.py b/setup.py
index 3bff9fa..3a0ab18 100644
--- a/setup.py
+++ b/setup.py
@@ -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.2.2.dev1',
+ version='2.3.0.dev1',
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 9ba2baa..462e33c 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -450,7 +450,7 @@ class TestIniParser:
config = newconfig("""
[section]
key2=
- cmd1 {item1} \ # a comment
+ cmd1 {item1} \
{item2}
""")
reader = SectionReader("section", config._cfg)
@@ -465,12 +465,32 @@ class TestIniParser:
config = newconfig("""
[section]
key1=
- cmd1 'with space' \ # a comment
- 'after the comment'
+ cmd1 'part one' \
+ 'part two'
""")
reader = SectionReader("section", config._cfg)
x = reader.getargvlist("key1")
- assert x == [["cmd1", "with space", "after the comment"]]
+ assert x == [["cmd1", "part one", "part two"]]
+
+ def test_argvlist_comment_after_command(self, tmpdir, newconfig):
+ config = newconfig("""
+ [section]
+ key1=
+ cmd1 --flag # run the flag on the command
+ """)
+ reader = SectionReader("section", config._cfg)
+ x = reader.getargvlist("key1")
+ assert x == [["cmd1", "--flag"]]
+
+ def test_argvlist_command_contains_hash(self, tmpdir, newconfig):
+ config = newconfig("""
+ [section]
+ key1=
+ cmd1 --re "use the # symbol for an arg"
+ """)
+ reader = SectionReader("section", config._cfg)
+ x = reader.getargvlist("key1")
+ assert x == [["cmd1", "--re", "use the # symbol for an arg"]]
def test_argvlist_positional_substitution(self, tmpdir, newconfig):
config = newconfig("""
diff --git a/tox/__init__.py b/tox/__init__.py
index f69bc2d..837768c 100644
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -1,5 +1,5 @@
#
-__version__ = '2.2.2.dev1'
+__version__ = '2.3.0.dev1'
from .hookspecs import hookspec, hookimpl # noqa
diff --git a/tox/config.py b/tox/config.py
index 7a500f0..480704b 100644
--- a/tox/config.py
+++ b/tox/config.py
@@ -1040,9 +1040,6 @@ class _ArgvlistReader:
current_command = ""
for line in value.splitlines():
line = line.rstrip()
- i = line.find("#")
- if i != -1:
- line = line[:i].rstrip()
if not line:
continue
if line.endswith("\\"):
@@ -1094,7 +1091,6 @@ class _ArgvlistReader:
shlexer = shlex.shlex(newcommand, posix=True)
shlexer.whitespace_split = True
shlexer.escape = ''
- shlexer.commenters = ''
argv = list(shlexer)
return argv