From fe8a1ba5216c71421f8a83ef62f3aabed634371b Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 26 Dec 2015 09:16:05 +1100 Subject: Unescape \{..\} --- tests/test_config.py | 4 ++-- tox/config.py | 1 + 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 -- cgit v1.2.1