Skip to content

Commit

Permalink
Add test to ensure that --devenv does not change provisioning directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Pedisich committed May 20, 2021
1 parent 8e4af11 commit 99930e7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/unit/session/test_provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,20 @@ def space_path2url(path):
if " " not in at_path:
return at_path
return urljoin("file:", pathname2url(os.path.abspath(at_path)))


def test_provision_does_not_occur_in_devenv(newconfig, next_tox_major):
"""Adding --devenv should not change the directory where provisioning occurs"""
with pytest.raises(MissingRequirement) as context:
newconfig(
["--devenv", "my_devenv"],
"""\
[tox]
minversion = {}
""".format(
next_tox_major,
),
)
config = context.value.config
assert config.run_provision is True
assert config.envconfigs[".tox"].envdir.basename != "my_devenv"

0 comments on commit 99930e7

Please sign in to comment.