summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2015-06-18 16:07:13 +0200
committerholger krekel <holger@merlinux.eu>2015-06-18 16:07:13 +0200
commit8602c192146a66b029919619ca32e2465546e6e0 (patch)
treea69d22507be3805551dd81835ad665f6a45aadd5 /tests
parent0c82e9c32d2f0b1209967f774325f0f780f83e97 (diff)
downloadtox-8602c192146a66b029919619ca32e2465546e6e0.tar.gz
remove --set-home option which probably nobody used and was hackily implemented
Diffstat (limited to 'tests')
-rw-r--r--tests/test_venv.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/test_venv.py b/tests/test_venv.py
index 37b0f50..f1574b1 100644
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -619,48 +619,3 @@ def test_command_relative_issue26(newmocksession, tmpdir, monkeypatch):
assert x4.endswith(os.sep + 'x')
mocksession.report.expect("warning", "*test command found but not*")
-
-def test_sethome_only_on_option(newmocksession, monkeypatch):
- mocksession = newmocksession([], "")
- venv = mocksession.getenv('python')
- action = mocksession.newaction(venv, "qwe", [])
- monkeypatch.setattr(tox.venv, "hack_home_env", None)
- venv._install(["x"], action=action)
-
-
-def test_sethome_works_on_option(newmocksession, monkeypatch):
- mocksession = newmocksession(["--set-home", "-i ALL=http://qwe"], "")
- venv = mocksession.getenv('python')
- action = mocksession.newaction(venv, "qwe", [])
- venv._install(["x"], action=action)
- _, mocked = mocksession.report.getnext("logpopen")
- p = mocked.env["HOME"]
- pydist = py.path.local(p).join(".pydistutils.cfg")
- assert "http://qwe" in pydist.read()
-
-
-def test_hack_home_env(tmpdir):
- from tox.venv import hack_home_env
- env = hack_home_env(tmpdir, "http://index")
- assert env["HOME"] == str(tmpdir)
- assert env["PIP_INDEX_URL"] == "http://index"
- assert "index_url = http://index" in \
- tmpdir.join(".pydistutils.cfg").read()
- tmpdir.remove()
- env = hack_home_env(tmpdir, None)
- assert env["HOME"] == str(tmpdir)
- assert not tmpdir.join(".pydistutils.cfg").check()
- assert "PIP_INDEX_URL" not in env
-
-
-def test_hack_home_env_passthrough(tmpdir, monkeypatch):
- from tox.venv import hack_home_env
- env = hack_home_env(tmpdir, "http://index")
- monkeypatch.setattr(os, "environ", env)
-
- tmpdir = tmpdir.mkdir("tmpdir2")
- env2 = hack_home_env(tmpdir)
- assert env2["HOME"] == str(tmpdir)
- assert env2["PIP_INDEX_URL"] == "http://index"
- assert "index_url = http://index" in \
- tmpdir.join(".pydistutils.cfg").read()