summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2013-08-21 13:37:30 +0200
committerholger krekel <holger@merlinux.eu>2013-08-21 13:37:30 +0200
commit9fd80ffff7ea0d164d71ba17431a6f0dc4d8d9bb (patch)
tree0759d3b76faa33bc324eeb075b8d6454549c588f
parentfe2a897abb8a981c2ca1cdae390b50cd3214bfe0 (diff)
downloadtox-9fd80ffff7ea0d164d71ba17431a6f0dc4d8d9bb.tar.gz
fix issue118: tests should check realpath() on both sides. Thanks Barry Warsaw.
-rwxr-xr-xCHANGELOG3
-rw-r--r--tests/test_venv.py6
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 01ddcfa..9144b6c 100755
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,9 @@
on "--set-home" for now. Should re-establish the old behaviour
when no option is given.
+- fix issue118: correctly have two tests use realpath(). Thanks Barry
+ Warsaw.
+
1.6.0
-----------------
diff --git a/tests/test_venv.py b/tests/test_venv.py
index 4a03b03..ab34db7 100644
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -25,7 +25,8 @@ def test_getsupportedinterpreter(monkeypatch, newconfig, mocksession):
venv = VirtualEnv(config.envconfigs['python'], session=mocksession)
interp = venv.getsupportedinterpreter()
# realpath needed for debian symlinks
- assert interp == py.path.local(sys.executable).realpath()
+ assert py.path.local(interp).realpath() \
+ == py.path.local(sys.executable).realpath()
monkeypatch.setattr(sys, 'platform', "win32")
monkeypatch.setattr(venv.envconfig, 'basepython', 'jython')
py.test.raises(tox.exception.UnsupportedInterpreter,
@@ -51,7 +52,8 @@ def test_create(monkeypatch, mocksession, newconfig):
assert "virtualenv" in str(args[1])
if sys.platform != "win32":
# realpath is needed for stuff like the debian symlinks
- assert py.path.local(sys.executable).realpath() == args[0]
+ assert py.path.local(sys.executable).realpath() \
+ == py.path.local(args[0]).realpath()
#assert Envconfig.toxworkdir in args
assert venv.getcommandpath("easy_install", cwd=py.path.local())
interp = venv._getliveconfig().python