tox-patches / bracket-substitution

# HG changeset patch
# Parent 53491262b26ddb497c957e215cf119b8932aecde
diff --git a/tests/test_config.py b/tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -488,7 +488,7 @@ class TestConfigTestEnv:
                 pytest-cov
             [testenv:py24]
             deps=
-                {testenv$deps}
+                {[testenv]deps}
                 fun
         """
         conf = newconfig([], inisource).envconfigs['py24']
@@ -506,8 +506,8 @@ class TestConfigTestEnv:
                 mock
             [testenv]
             deps=
-                {testing:pytest$deps}
-                {testing:mock$deps}
+                {[testing:pytest]deps}
+                {[testing:mock]deps}
                 fun
         """
         conf = newconfig([], inisource)
@@ -527,12 +527,12 @@ class TestConfigTestEnv:
 
             [testing]
             deps=
-                {testing:pytest$deps}
-                {testing:mock$deps}
+                {[testing:pytest]deps}
+                {[testing:mock]deps}
 
             [testenv]
             deps=
-                {testing$deps}
+                {[testing]deps}
                 fun
         """
         conf = newconfig([], inisource)
@@ -544,14 +544,14 @@ class TestConfigTestEnv:
         inisource="""
             [testing:pytest]
             deps=
-                {testing:mock$deps}
+                {[testing:mock]deps}
             [testing:mock]
             deps=
-                {testing:pytest$deps}
+                {[testing:pytest]deps}
  
             [testenv]
             deps=
-                {testing:pytest$deps}
+                {[testing:pytest]deps}
         """
         py.test.raises(ValueError, newconfig, [], inisource)
 
@@ -560,7 +560,7 @@ class TestConfigTestEnv:
             [common]
             changedir = testing
             [testenv]
-            changedir = {common$changedir}
+            changedir = {[common]changedir}
         """
         conf = newconfig([], inisource).envconfigs['python']
         assert conf.changedir.basename == 'testing'
diff --git a/tox/_config.py b/tox/_config.py
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -406,8 +406,8 @@ class IniReader:
                     (key, envkey))
             return os.environ[envkey]
         if key not in self._subs:
-            if'$' in key:
-                section, item = key.rsplit('$', 1)
+            if key[0] == '[' and ']' in key:
+                section, item = key[1:].split(']', 1)
 
                 if section in self._cfg and item in self._cfg[section]:
                     if (section, item) in self._subststack:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.