diff options
| author | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> | 2011-04-30 17:39:19 +0200 |
|---|---|---|
| committer | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> | 2011-04-30 17:39:19 +0200 |
| commit | f4c64696d6b4904e6e5009df96829f8d10d63a8d (patch) | |
| tree | 1218ca1c40d7d47ecb3a27e7ed7afa1a9a9a4863 | |
| parent | 11e26f8e7fc95cb04d52965bb910e388b80e3a2f (diff) | |
| download | tox-f4c64696d6b4904e6e5009df96829f8d10d63a8d.tar.gz | |
use realpath in the venv tests to account for sys.executable being a symlink
| -rw-r--r-- | tests/test_venv.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_venv.py b/tests/test_venv.py index 953e220..e8dd793 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -43,7 +43,8 @@ def test_getsupportedinterpreter(monkeypatch, newconfig, mocksession): """ % sys.executable) venv = VirtualEnv(config.envconfigs['python'], session=mocksession) interp = venv.getsupportedinterpreter() - assert interp == sys.executable + # realpath needed for debian symlinks + assert interp == py.path.local(sys.executable).realpath() monkeypatch.setattr(sys, 'platform', "win32") monkeypatch.setattr(venv.envconfig, 'basepython', 'jython') py.test.raises(tox.exception.UnsupportedInterpreter, @@ -69,7 +70,8 @@ def test_create(monkeypatch, mocksession, newconfig): if sys.platform != "win32": i = args.index("-p") assert i != -1, args - assert sys.executable == args[i+1] + # realpath is needed for stuff like the debian symlinks + assert py.path.local(sys.executable).realpath() == args[i+1] #assert Envconfig.toxworkdir in args assert venv.getcommandpath("easy_install") interp = venv._getliveconfig().python |
