diff options
author | holger krekel <holger@merlinux.eu> | 2015-11-06 17:44:55 +0100 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2015-11-06 17:44:55 +0100 |
commit | f410ba9039185ca914aebc673f4b6b587d1471b1 (patch) | |
tree | e4cbd539e19cde7ba1beee3a0ab4f55c0abe6c6e /tests | |
parent | c4c086a1747c0340f64dbb95bd58936f0e6c0676 (diff) | |
parent | a48806c94fcb4548bb83eee500b8f0a8cf7ee891 (diff) | |
download | tox-f410ba9039185ca914aebc673f4b6b587d1471b1.tar.gz |
Merged in rebeckag/tox/174-voting-testenv (pull request #170)
#174 voting testenv
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_config.py | 9 | ||||
-rw-r--r-- | tests/test_venv.py | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 93cd8bf..16e1e57 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -640,6 +640,7 @@ class TestConfigTestEnv: int_hashseed = int(hashseed) # hashseed is random by default, so we can't assert a specific value. assert int_hashseed > 0 + assert envconfig.ignore_outcome is False def test_sitepackages_switch(self, tmpdir, newconfig): config = newconfig(["--sitepackages"], "") @@ -1269,6 +1270,14 @@ class TestConfigTestEnv: assert [d.name for d in configs["py27-django1.6"].deps] \ == ["Django==1.6"] + def test_ignore_outcome(self, newconfig): + inisource = """ + [testenv] + ignore_outcome=True + """ + config = newconfig([], inisource).envconfigs + assert config["python"].ignore_outcome is True + class TestGlobalOptions: def test_notest(self, newconfig): diff --git a/tests/test_venv.py b/tests/test_venv.py index 7c6b05a..b454f5b 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -7,6 +7,7 @@ import tox.config from tox.venv import * # noqa from tox.interpreters import NoInterpreterInfo + # def test_global_virtualenv(capfd): # v = VirtualEnv() # l = v.list() @@ -611,3 +612,17 @@ def test_command_relative_issue26(newmocksession, tmpdir, monkeypatch): x4 = venv.getcommandpath("x", cwd=tmpdir) assert x4.endswith(os.sep + 'x') mocksession.report.expect("warning", "*test command found but not*") + + +def test_ignore_outcome_failing_cmd(newmocksession): + mocksession = newmocksession([], """ + [testenv] + commands=testenv_fail + ignore_outcome=True + """) + + venv = mocksession.getenv('python') + venv.test() + assert venv.status == "ignored failed command" + mocksession.report.expect("warning", "*command failed but result from " + "testenv is ignored*") |