diff options
author | Bernát Gábor <gaborjbernat@gmail.com> | 2022-12-02 22:22:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 22:22:25 -0800 |
commit | d9de29da802edaa8b7291ca27d59b0ba0c1d2c26 (patch) | |
tree | 9b2fae7d49b2548730a6150a3bf306a51587ebf1 /tests | |
parent | 3bae5d9d3360ae34d558afcd8a0f3ac9e51fa808 (diff) | |
download | tox-git-d9de29da802edaa8b7291ca27d59b0ba0c1d2c26.tar.gz |
Allow replacing keys with - in INI config (#2581)
Resolves https://github.com/tox-dev/tox/issues/2569
Diffstat (limited to 'tests')
-rw-r--r-- | tests/config/loader/ini/replace/test_replace_tox_env.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/config/loader/ini/replace/test_replace_tox_env.py b/tests/config/loader/ini/replace/test_replace_tox_env.py index c71e1822..284d6c7c 100644 --- a/tests/config/loader/ini/replace/test_replace_tox_env.py +++ b/tests/config/loader/ini/replace/test_replace_tox_env.py @@ -121,6 +121,12 @@ def test_replace_from_tox_section_missing_section(tox_ini_conf: ToxIniCreator) - assert conf_a["x"] == "{[magic]a}" +def test_replace_from_tox_section_key_with_dash(tox_ini_conf: ToxIniCreator) -> None: + conf_a = tox_ini_conf("[testenv:a]\nx = {[magic]a-b}\n[magic]\na-b=1").get_env("a") + conf_a.add_config(keys="x", of_type=str, default="o", desc="o") + assert conf_a["x"] == "1" + + def test_replace_circular(tox_ini_conf: ToxIniCreator) -> None: conf_a = tox_ini_conf("[testenv:a]\nx = {y}\ny = {x}").get_env("a") conf_a.add_config(keys="x", of_type=str, default="o", desc="o") |