[Python-modules-commits] [tox] 24/69: Fix tests by using .realpath() on both sides of the assertion.
Barry Warsaw
barry at moszumanska.debian.org
Fri Sep 5 23:26:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
barry pushed a commit to branch master
in repository tox.
commit c930efb1c2b57a4dc26f4dab31cad16a1a62052a
Author: Barry Warsaw <barry at debian.org>
Date: Tue Aug 20 21:48:05 2013 -0400
Fix tests by using .realpath() on both sides of the assertion.
Bug: https://bitbucket.org/hpk42/tox/issue/118/test-failures-in-a-debian-build
Patch-Name: test-fixes.patch
---
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 e6792ed..56446a9 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/tox.git
More information about the Python-modules-commits
mailing list