Skip to content

Commit

Permalink
Add simple test for venv module
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan P Kilby committed Sep 13, 2017
1 parent 71db21e commit d955e28
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ def test_getsupportedinterpreter(monkeypatch, newconfig, mocksession):
pytest.raises(tox.exception.InvocationError, venv.getsupportedinterpreter)


def test_module(mocksession, newconfig):
config = newconfig([], """
[testenv:py2]
basepython=python2.7
[testenv:py3]
basepython=python3.6
""")
venv = VirtualEnv(config.envconfigs['py2'], session=mocksession)
assert venv._module() == 'virtualenv'
venv = VirtualEnv(config.envconfigs['py3'], session=mocksession)
assert venv._module() == 'venv'


def test_create(monkeypatch, mocksession, newconfig):
config = newconfig([], """
[testenv:py123]
Expand Down

0 comments on commit d955e28

Please sign in to comment.