summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2019-04-02 18:45:46 -0400
committerGitHub <noreply@github.com>2019-04-02 18:45:46 -0400
commit3337263063db09d6ed7e52ffea0151017fe9c321 (patch)
tree861e55dbeea2a7aae2e5f9a93a855b7b62a0f553
parent513bc00bf90bd515d99685abd628f93395de22fe (diff)
downloadtox-git-3337263063db09d6ed7e52ffea0151017fe9c321.tar.gz
fix (#1243)
-rw-r--r--docs/changelog/1239.bugfix.rst2
-rw-r--r--src/tox/config/__init__.py2
-rw-r--r--tests/unit/config/test_config.py21
3 files changed, 25 insertions, 0 deletions
diff --git a/docs/changelog/1239.bugfix.rst b/docs/changelog/1239.bugfix.rst
new file mode 100644
index 00000000..3787919d
--- /dev/null
+++ b/docs/changelog/1239.bugfix.rst
@@ -0,0 +1,2 @@
+the isolated build env now ignores :conf:`sitepackages`, :conf:`deps` and :conf:`description` as these do not make
+sense - by :user:`gaborbernat`
diff --git a/src/tox/config/__init__.py b/src/tox/config/__init__.py
index 53e4003a..ea6d9676 100644
--- a/src/tox/config/__init__.py
+++ b/src/tox/config/__init__.py
@@ -1135,6 +1135,8 @@ class ParseIni(object):
section_name = "testenv:{}".format(name)
if section_name not in self._cfg.sections:
self._cfg.sections[section_name] = {}
+ self._cfg.sections[section_name]["deps"] = ""
+ self._cfg.sections[section_name]["sitepackages"] = "False"
self._cfg.sections[section_name]["description"] = "isolated packaging environment"
config.envconfigs[name] = self.make_envconfig(
name, "{}{}".format(testenvprefix, name), reader._subs, config
diff --git a/tests/unit/config/test_config.py b/tests/unit/config/test_config.py
index 55cbb547..ccb8200f 100644
--- a/tests/unit/config/test_config.py
+++ b/tests/unit/config/test_config.py
@@ -2946,6 +2946,27 @@ def test_isolated_build_overrides(newconfig, capsys):
assert deps == []
+@pytest.mark.parametrize(
+ "key, set_value, default", [("deps", "crazy", []), ("sitepackages", "True", False)]
+)
+def test_isolated_build_ignores(newconfig, capsys, key, set_value, default):
+ config = newconfig(
+ [],
+ """
+ [tox]
+ isolated_build = True
+
+ [testenv]
+ {} = {}
+ """.format(
+ key, set_value
+ ),
+ )
+ package_env = config.envconfigs.get(".package")
+ value = getattr(package_env, key)
+ assert value == default
+
+
def test_config_via_pyproject_legacy(initproj):
initproj(
"config_via_pyproject_legacy-0.5",