From 11e26f8e7fc95cb04d52965bb910e388b80e3a2f Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Fri, 29 Apr 2011 14:03:12 +0200 Subject: add __init__.py to tests so testing normally works without a develop install --- tests/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 -- cgit v1.2.1 From f4c64696d6b4904e6e5009df96829f8d10d63a8d Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 30 Apr 2011 17:39:19 +0200 Subject: use realpath in the venv tests to account for sys.executable being a symlink --- tests/test_venv.py | 6 ++++-- 1 file 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 -- cgit v1.2.1