Skip to content

Commit

Permalink
test_config: Add test for indirect install_command
Browse files Browse the repository at this point in the history
Problem identified in #1777
  • Loading branch information
jayvdb authored and gaborbernat committed Jan 12, 2021
1 parent 3914667 commit c1c1c5b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/unit/config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,26 @@ def test_install_command_substitutions(self, newconfig):
]
assert envconfig.install_command == expected_deps

def test_install_command_substitutions_other_section(self, newconfig):
config = newconfig(
"""
[base]
install_command=some_install --arg={toxinidir}/foo \
{envname} {opts} {packages}
[testenv]
install_command={[base]install_command}
""",
)
envconfig = config.envconfigs["python"]
expected_deps = [
"some_install",
"--arg={}/foo".format(config.toxinidir),
"python",
"{opts}",
"{packages}",
]
assert envconfig.install_command == expected_deps

def test_pip_pre(self, newconfig):
config = newconfig(
"""
Expand Down

0 comments on commit c1c1c5b

Please sign in to comment.