summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Vandenberg <jayvdb@gmail.com>2015-12-26 09:16:05 +1100
committerJohn Vandenberg <jayvdb@gmail.com>2015-12-26 09:16:05 +1100
commitfe8a1ba5216c71421f8a83ef62f3aabed634371b (patch)
treee16dadb3fe47cd7206a7f8d6bc4839dc9c4b1e5e
parentdeaacda2f7691916ff9fb703536b012d6d546208 (diff)
downloadtox-fe8a1ba5216c71421f8a83ef62f3aabed634371b.tar.gz
Unescape \{..\}
-rw-r--r--tests/test_config.py4
-rw-r--r--tox/config.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index 6176641..7c0e411 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -1015,12 +1015,12 @@ class TestConfigTestEnv:
"""
conf = newconfig([], inisource).envconfigs['py27']
argv = conf.commands
- assert argv[0] == ['echo', '\\{posargs\\}', '=']
+ assert argv[0] == ['echo', '{posargs}', '=']
assert argv[1] == ['echo', 'posargs = ', ""]
conf = newconfig(['dog', 'cat'], inisource).envconfigs['py27']
argv = conf.commands
- assert argv[0] == ['echo', '\\{posargs\\}', '=', 'dog', 'cat']
+ assert argv[0] == ['echo', '{posargs}', '=', 'dog', 'cat']
assert argv[1] == ['echo', 'posargs = ', 'dog cat']
def test_rewrite_posargs(self, tmpdir, newconfig):
diff --git a/tox/config.py b/tox/config.py
index 079dff3..230508d 100644
--- a/tox/config.py
+++ b/tox/config.py
@@ -1129,6 +1129,7 @@ class _ArgvlistReader:
new_arg = ""
new_word = reader._replace(word)
new_word = reader._replace(new_word)
+ new_word = new_word.replace('\\{', '{').replace('\\}', '}')
new_arg += new_word
newcommand += new_arg