1. Ronny Pfannschmidt
  2. tox-patches

Commits

Ronny Pfannschmidt  committed 5c02196

bracket sections

  • Participants
  • Parent commits f20716f
  • Branches default

Comments (0)

Files changed (2)

File bracket-substitution

View file
  • Ignore whitespace
+# 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:

File series

View file
  • Ignore whitespace
+bracket-substitution
 context-discovery
 homedir-not-for-ci