From 1335712c7a4e99a032f4254827dbf71324b34dbb Mon Sep 17 00:00:00 2001 From: Lukasz Balcerzak Date: Thu, 20 Jun 2013 21:05:30 +0200 Subject: Added tests for envdir config --- tests/test_config.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index 4d40960..dfb09e7 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -44,6 +44,22 @@ class TestVenvConfig: assert dep2.indexserver.name == "xyz" assert dep2.indexserver.url == "xyz_repo" + def test_envdir_set_manually(self, tmpdir, newconfig): + config = newconfig([], """ + [testenv:devenv] + envdir = devenv + """) + envconfig = config.envconfigs['devenv'] + assert envconfig.envdir == tmpdir.join('devenv') + + def test_envdir_set_manually_with_substitutions(self, tmpdir, newconfig): + config = newconfig([], """ + [testenv:devenv] + envdir = {toxworkdir}/foobar + """) + envconfig = config.envconfigs['devenv'] + assert envconfig.envdir == config.toxworkdir.join('foobar') + class TestConfigPackage: def test_defaults(self, tmpdir, newconfig): config = newconfig([], "") -- cgit v1.2.1