4 new commits in tox: https://bitbucket.org/hpk42/tox/commits/1e2f3676cd33/ Changeset: 1e2f3676cd33 User: hpk42 Date: 2013-08-18 13:08:12 Summary: fix doc typo Affected #: 1 file
diff -r 78ace40b78b55eb729dd95cc7028347b73689739 -r 1e2f3676cd33a29d9c379be2da0d100f075d0fcb doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -87,7 +87,7 @@ the virtual environment; both the package under test and any defined dependencies. Must contain the substitution key ``{packages}`` which will be replaced by the packages to - install. You should also accept "{opts}" if you are using + install. You should also accept ``{opts}`` if you are using pip or easy_install -- it will contain index server options if you have configured them via :confval:`indexserver` and the deprecated :confval:`downloadcache` option https://bitbucket.org/hpk42/tox/commits/e4c41b2148db/ Changeset: e4c41b2148db User: hpk42 Date: 2013-08-21 13:31:22 Summary: fix issue119: sitepackagesdir now correctly points to virtualenv dir, not tox's own. also added a test to prevent regression. Affected #: 3 files diff -r 1e2f3676cd33a29d9c379be2da0d100f075d0fcb -r e4c41b2148db9138278e3764f37cb2c834a9818e CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +1.6.1 +----- + +- fix issue119: {envsitepackagesdir} is now correctly computed and has + a better test to prevent regression. + + 1.6.0 ----------------- diff -r 1e2f3676cd33a29d9c379be2da0d100f075d0fcb -r e4c41b2148db9138278e3764f37cb2c834a9818e tests/test_z_cmdline.py --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -636,7 +636,7 @@ result = cmd.run("tox") assert result.ret == 0 result.stdout.fnmatch_lines(""" - X:*site-packages* + X:*.tox*python*site-packages* """) def verify_json_report_format(data, testenvs=True): diff -r 1e2f3676cd33a29d9c379be2da0d100f075d0fcb -r e4c41b2148db9138278e3764f37cb2c834a9818e tox/interpreters.py --- a/tox/interpreters.py +++ b/tox/interpreters.py @@ -20,6 +20,7 @@ return self.name2executable[name] except KeyError: self.name2executable[name] = e = find_executable(name) + print ("executable for %s is %s" %(name, e)) return e def get_info(self, name=None, executable=None): @@ -31,6 +32,7 @@ executable = self.get_executable(name) if not executable: return NoInterpreterInfo(name=name) + print ("get info for %s" % executable) try: return self.executable2info[executable] except KeyError: @@ -169,4 +171,4 @@ def sitepackagesdir(envdir): from distutils.sysconfig import get_python_lib - return dict(dir=get_python_lib(envdir)) + return dict(dir=get_python_lib(prefix=envdir)) https://bitbucket.org/hpk42/tox/commits/df42ff838df0/ Changeset: df42ff838df0 User: hpk42 Date: 2013-08-21 13:34:09 Summary: fix issue116: make 1.6 introduced behaviour of changing to a per-env HOME directory during install activities dependent on "--set-home" for now. Should re-establish the old behaviour. Affected #: 6 files diff -r e4c41b2148db9138278e3764f37cb2c834a9818e -r df42ff838df081b61fd4f02b4545cc33ee70062e CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,10 @@ - fix issue119: {envsitepackagesdir} is now correctly computed and has a better test to prevent regression. +- fix issue116: make 1.6 introduced behaviour of changing to a + per-env HOME directory during install activities dependent + on "--set-home" for now. Should re-establish the old behaviour + when no option is given. 1.6.0 ----------------- diff -r e4c41b2148db9138278e3764f37cb2c834a9818e -r df42ff838df081b61fd4f02b4545cc33ee70062e setup.py --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.6.0', + version='1.6.1', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r e4c41b2148db9138278e3764f37cb2c834a9818e -r df42ff838df081b61fd4f02b4545cc33ee70062e tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -568,6 +568,24 @@ x4 = venv.getcommandpath("x", cwd=tmpdir) mocksession.report.expect("warning", "*test command found but not*") +def test_sethome_only_on_option(newmocksession, monkeypatch): + mocksession = newmocksession([], "") + venv = mocksession.getenv('python') + action = mocksession.newaction(venv, "qwe", []) + monkeypatch.setattr(tox._venv, "hack_home_env", None) + venv._install(["x"], action=action) + +def test_sethome_works_on_option(newmocksession, monkeypatch): + mocksession = newmocksession(["--set-home", "-i ALL=http://qwe"], "") + venv = mocksession.getenv('python') + action = mocksession.newaction(venv, "qwe", []) + venv._install(["x"], action=action) + _, mocked = mocksession.report.getnext("logpopen") + p = mocked.env["HOME"] + pydist = py.path.local(p).join(".pydistutils.cfg") + assert "http://qwe" in pydist.read() + + def test_hack_home_env(tmpdir): from tox._venv import hack_home_env env = hack_home_env(tmpdir, "http://index") diff -r e4c41b2148db9138278e3764f37cb2c834a9818e -r df42ff838df081b61fd4f02b4545cc33ee70062e tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.6.0' +__version__ = '1.6.1' class exception: class Error(Exception): diff -r e4c41b2148db9138278e3764f37cb2c834a9818e -r df42ff838df081b61fd4f02b4545cc33ee70062e tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -99,6 +99,10 @@ parser.add_argument("--develop", action="store_true", dest="develop", help="install package in the venv using 'setup.py develop' via " "'pip -e .'") + parser.add_argument("--set-home", action="store_true", dest="sethome", + help="(experimental) force creating a new $HOME for each test " + "environment and create .pydistutils.cfg|pip.conf files " + "if index servers are specified with tox. ") parser.add_argument('-i', action="append", dest="indexurl", metavar="URL", help="set indexserver url (if URL is of form name=url set the " diff -r e4c41b2148db9138278e3764f37cb2c834a9818e -r df42ff838df081b61fd4f02b4545cc33ee70062e tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -322,9 +322,13 @@ extraopts = extraopts or [] for ixserver in l: - extraenv = hack_home_env( - homedir=self.envconfig.envtmpdir.join("pseudo-home"), - index_url = ixserver.url) + if self.envconfig.config.option.sethome: + extraenv = hack_home_env( + homedir=self.envconfig.envtmpdir.join("pseudo-home"), + index_url = ixserver.url) + else: + extraenv = {} + args = d[ixserver] + extraopts self.run_install_command(args, ixserver.url, action, extraenv=extraenv) https://bitbucket.org/hpk42/tox/commits/714d84b76856/ Changeset: 714d84b76856 User: hpk42 Date: 2013-08-21 13:37:30 Summary: fix issue118: tests should check realpath() on both sides. Thanks Barry Warsaw. Affected #: 2 files diff -r df42ff838df081b61fd4f02b4545cc33ee70062e -r 714d84b76856a23f7b4967903130b95cd973475a CHANGELOG --- 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 -r df42ff838df081b61fd4f02b4545cc33ee70062e -r 714d84b76856a23f7b4967903130b95cd973475a tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -25,7 +25,8 @@ 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 @@ 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 Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org http://mail.python.org/mailman/listinfo/pytest-commit