[Python-modules-commits] [tox] 07/69: Fix various problems in the test suite, which become evident in

Barry Warsaw barry at moszumanska.debian.org
Fri Sep 5 23:26:23 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 e3f71f107587a63d07171658fa8bc1649e38dc0a
Author: Barry Warsaw <barry at python.org>
Date:   Mon Nov 19 22:17:45 2012 -0500

    Fix various problems in the test suite, which become evident in
    
     an sbuild and other builder environments.
     + In an sbuild environment, $USER will not match $HOME.
     + argv[0] should not contribute to test string.
    Bug: https://bitbucket.org/hpk42/tox/issue/60/home-does-not-always-equal-user
    Bug: https://bitbucket.org/hpk42/tox/issue/61/test-incorrectly-includes-argv-0
    
    Patch-Name: test-problems.patch
---
 tests/test_config.py | 2 +-
 tests/test_venv.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_config.py b/tests/test_config.py
index 9ad8398..3db2702 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -429,7 +429,7 @@ class TestConfigTestEnv:
         assert argv[3][0] == conf.envbindir
         assert argv[4][0] == conf.envtmpdir
         assert argv[5][0] == conf.envpython
-        assert argv[6][0] == os.path.expanduser("~")
+        assert argv[6][0] == os.environ['HOME']
         assert argv[7][0] == config.homedir.join(".tox", "distshare")
         assert argv[8][0] == conf.envlogdir
 
diff --git a/tests/test_venv.py b/tests/test_venv.py
index 3db3a6b..1b40f4a 100644
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -189,7 +189,7 @@ def test_install_deps_indexserver(newmocksession):
     venv.install_deps()
     # two different index servers, two calls
     assert len(l) == 2
-    args = " ".join(l[0].args)
+    args = " ".join(l[0].args[1:])
     assert "-i" not in args
     assert "dep1" in args
 

-- 
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