diff options
| author | Lukasz Balcerzak <lukaszbalcerzak@gmail.com> | 2013-06-20 23:42:02 +0200 |
|---|---|---|
| committer | Lukasz Balcerzak <lukaszbalcerzak@gmail.com> | 2013-06-20 23:42:02 +0200 |
| commit | b9553c87b63e8911058d1ee154d60922cd2e42df (patch) | |
| tree | d96e1861de4f6bbff1865c352ab28d0e74ea5340 | |
| parent | 9f80181495f5ba54c3a3b6b266acfc340e589c1c (diff) | |
| download | tox-b9553c87b63e8911058d1ee154d60922cd2e42df.tar.gz | |
Added package flag to venv config
| -rw-r--r-- | tests/test_config.py | 14 | ||||
| -rw-r--r-- | tox/_config.py | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index dfb09e7..e3e5c62 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -60,6 +60,20 @@ class TestVenvConfig: envconfig = config.envconfigs['devenv'] assert envconfig.envdir == config.toxworkdir.join('foobar') + def test_package_flag(self, tmpdir, newconfig): + config = newconfig([], """ + [testenv:py27] + """) + envconfig = config.envconfigs['py27'] + assert envconfig.package == True + + config = newconfig([], """ + [testenv:py27] + package = False + """) + envconfig = config.envconfigs['py27'] + assert envconfig.package == False + class TestConfigPackage: def test_defaults(self, tmpdir, newconfig): config = newconfig([], "") diff --git a/tox/_config.py b/tox/_config.py index 3b6c217..b6cf80c 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -256,6 +256,7 @@ class parseini: reader = IniReader(self._cfg, fallbacksections=["testenv"]) reader.addsubstitions(**subs) vc.envdir = reader.getpath(section, "envdir", "{toxworkdir}/%s" % name) + vc.package = reader.getbool(section, "package", True) vc.args_are_paths = reader.getbool(section, "args_are_paths", True) if reader.getdefault(section, "python", None): raise tox.exception.ConfigError( |
