[Pytest-commit] commit/tox: hpk42: add test and changelog for better report if we can't get version_info
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Sep 23 16:38:27 CEST 2014
1 new commit in tox:
https://bitbucket.org/hpk42/tox/commits/ad8d6e2e7690/
Changeset: ad8d6e2e7690
User: hpk42
Date: 2014-09-23 14:38:01+00:00
Summary: add test and changelog for better report if we can't get version_info
from an interpreter executable.
Affected #: 2 files
diff -r 9dd51ef1cdbb000809b509dffd79288453155e85 -r ad8d6e2e76902db255b858d2c08a461d9b104e99 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -11,6 +11,9 @@
- fix issue152: set VIRTUAL_ENV when running test commands,
thanks Florian Ludwig.
+- better report if we can't get version_info from an interpreter
+ executable. Thanks Floris Bruynooghe.
+
1.7.2
-----------
diff -r 9dd51ef1cdbb000809b509dffd79288453155e85 -r ad8d6e2e76902db255b858d2c08a461d9b104e99 tests/test_venv.py
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -4,6 +4,7 @@
import os, sys
import tox._config
from tox._venv import * # noqa
+from tox.interpreters import NoInterpreterInfo
#def test_global_virtualenv(capfd):
# v = VirtualEnv()
@@ -34,6 +35,12 @@
monkeypatch.setattr(venv.envconfig, 'basepython', 'notexistingpython')
py.test.raises(tox.exception.InterpreterNotFound,
venv.getsupportedinterpreter)
+ monkeypatch.undo()
+ # check that we properly report when no version_info is present
+ info = NoInterpreterInfo(name=venv.name)
+ info.executable = "something"
+ monkeypatch.setattr(config.interpreters, "get_info", lambda *args: info)
+ pytest.raises(tox.exception.InvocationError, venv.getsupportedinterpreter)
def test_create(monkeypatch, mocksession, newconfig):
Repository URL: https://bitbucket.org/hpk42/tox/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list