From 4fc6232cca41006bcc9403a2411c655bc5e37cd4c7bd005e3f5a9a6e876fa798 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 5 Sep 2013 08:16:43 +0000 Subject: [PATCH] - Update to version 1.6.0: + 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. + fix issue118: correctly have two tests use realpath(). Thanks Barry Warsaw. + fix test runs on environments without a home directory (in this case we use toxinidir as the homedir) + fix issue117: python2.5 fix: don't use ``--insecure`` option because its very existence depends on presence of "ssl". If you want to support python2.5/pip1.3.1 based test environments you need to install ssl and/or use PIP_INSECURE=1 through ``setenv``. section. + fix issue102: change to {toxinidir} when installing dependencies. this allows to use relative path like in "-rrequirements.txt". - Changes from version 1.6.0: + fix issue35: add new EXPERIMENTAL "install_command" testenv-option to configure the installation command with options for dep/pkg install. Thanks Carl Meyer for the PR and docs. + fix issue91: python2.5 support by vendoring the virtualenv-1.9.1 script and forcing pip<1.4. Also the default [py25] environment modifies the default installer_command (new config option) to use pip without the "--pre" option which was introduced with pip-1.4 and is now required if you want to install non-stable releases. (tox defaults to install with "--pre" everywhere). + during installation of dependencies HOME is now set to a pseudo location ({envtmpdir}/pseudo-home). If an index url was specified a .pydistutils.cfg file will be written with an index_url setting OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=13 --- python-tox.changes | 53 +++++ python-tox.spec | 11 +- tox-1.5.0.tar.gz | 3 - tox-1.6.1.tar.gz | 3 + tox-disable-network-accessing-tests.patch | 226 ++++++++++++++++++++++ 5 files changed, 289 insertions(+), 7 deletions(-) delete mode 100644 tox-1.5.0.tar.gz create mode 100644 tox-1.6.1.tar.gz create mode 100644 tox-disable-network-accessing-tests.patch diff --git a/python-tox.changes b/python-tox.changes index 8ed7e34..93d1681 100644 --- a/python-tox.changes +++ b/python-tox.changes @@ -1,3 +1,56 @@ +------------------------------------------------------------------- +Thu Sep 5 07:29:06 UTC 2013 - speilicke@suse.com + +- Update to version 1.6.0: + + 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. + + fix issue118: correctly have two tests use realpath(). Thanks Barry + Warsaw. + + fix test runs on environments without a home directory + (in this case we use toxinidir as the homedir) + + fix issue117: python2.5 fix: don't use ``--insecure`` option because + its very existence depends on presence of "ssl". If you + want to support python2.5/pip1.3.1 based test environments you need + to install ssl and/or use PIP_INSECURE=1 through ``setenv``. section. + + fix issue102: change to {toxinidir} when installing dependencies. + this allows to use relative path like in "-rrequirements.txt". +- Changes from version 1.6.0: + + fix issue35: add new EXPERIMENTAL "install_command" testenv-option to + configure the installation command with options for dep/pkg install. + Thanks Carl Meyer for the PR and docs. + + fix issue91: python2.5 support by vendoring the virtualenv-1.9.1 + script and forcing pip<1.4. Also the default [py25] environment + modifies the default installer_command (new config option) + to use pip without the "--pre" option which was introduced + with pip-1.4 and is now required if you want to install non-stable + releases. (tox defaults to install with "--pre" everywhere). + + during installation of dependencies HOME is now set to a pseudo + location ({envtmpdir}/pseudo-home). If an index url was specified + a .pydistutils.cfg file will be written with an index_url setting + so that packages defining ``setup_requires`` dependencies will not + silently use your HOME-directory settings or https://pypi.python.org. + + fix issue1: empty setup files are properly detected, thanks Anthon van + der Neuth + + remove toxbootstrap.py for now because it is broken. + + fix issue109 and fix issue111: multiple "-e" options are now combined + (previously the last one would win). Thanks Anthon van der Neut. + + add --result-json option to write out detailed per-venv information + into a json report file to be used by upstream tools. + + add new config options ``usedevelop`` and ``skipsdist`` as well as a + command line option ``--develop`` to install the package-under-test in develop mode. + thanks Monty Tailor for the PR. + + always unset PYTHONDONTWRITEBYTE because newer setuptools doesn't like it + + if a HOMEDIR cannot be determined, use the toxinidir. + + refactor interpreter information detection to live in new + tox/interpreters.py file, tests in tests/test_interpreters.py. +- Add tox-disable-network-accessing-tests.patch: Disable tests that insist on + downloading dependencies over network +- Run testsuite + ------------------------------------------------------------------- Tue Jun 25 11:49:47 UTC 2013 - dmueller@suse.com diff --git a/python-tox.spec b/python-tox.spec index 0b0e081..bd01b31 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -17,17 +17,18 @@ Name: python-tox -Version: 1.5.0 +Version: 1.6.1 Release: 0 Summary: Virtualenv-based automation of test activities License: MIT Group: Development/Languages/Python Url: http://codespeak.net/tox Source: http://pypi.python.org/packages/source/t/tox/tox-%{version}.tar.gz +Patch0: tox-disable-network-accessing-tests.patch BuildRequires: python-Sphinx BuildRequires: python-devel BuildRequires: python-py >= 1.4.9 -BuildRequires: python-pytest +BuildRequires: python-pytest >= 2.3.5 BuildRequires: python-virtualenv BuildRequires: unzip Requires: python-py @@ -56,6 +57,8 @@ use for: %prep %setup -q -n tox-%{version} +%patch0 -p1 +sed -i -e "/^\\[testenv\\]/ a\\sitepackages = True" tox.ini %build python setup.py build @@ -64,8 +67,8 @@ cd doc && make html && rm -r _build/html/.buildinfo # Generate HTML documentatio %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} -# %%check -# python setup.py test +%check +PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python_sitelib}/ python setup.py test %files %defattr(-,root,root,-) diff --git a/tox-1.5.0.tar.gz b/tox-1.5.0.tar.gz deleted file mode 100644 index 12df12e..0000000 --- a/tox-1.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0cde6be977c57289551bf316871b888ad78f94edca8972374a68a9d1bfcd5226 -size 73866 diff --git a/tox-1.6.1.tar.gz b/tox-1.6.1.tar.gz new file mode 100644 index 0000000..58448ee --- /dev/null +++ b/tox-1.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05c72b3b7481b47f48f63436c7355783dc8be77ffd7c2bc948b0b7aa2dd4d0de +size 131654 diff --git a/tox-disable-network-accessing-tests.patch b/tox-disable-network-accessing-tests.patch new file mode 100644 index 0000000..f1e47db --- /dev/null +++ b/tox-disable-network-accessing-tests.patch @@ -0,0 +1,226 @@ +Binary files a/tests/.test_config.py.swp and b/tests/.test_config.py.swp differ +diff -ruN a/tests/test_z_cmdline.py b/tests/test_z_cmdline.py +--- a/tests/test_z_cmdline.py 2013-09-04 15:55:04.000000000 +0200 ++++ b/tests/test_z_cmdline.py 2013-09-05 10:12:19.605599163 +0200 +@@ -380,47 +380,47 @@ + ''' + }) + +- def test_toxuone_env(self, cmd, example123): +- result = cmd.run("tox") +- assert not result.ret +- result.stdout.fnmatch_lines([ +- "*junit-python.xml*", +- "*1 passed*", +- ]) +- result = cmd.run("tox", "-epython", ) +- assert not result.ret +- result.stdout.fnmatch_lines([ +- "*1 passed*", +- "*summary*", +- "*python: commands succeeded" +- ]) +- +- def test_different_config_cwd(self, cmd, example123, monkeypatch): +- # see that things work with a different CWD +- monkeypatch.chdir(cmd.tmpdir) +- result = cmd.run("tox", "-c", "example123/tox.ini") +- assert not result.ret +- result.stdout.fnmatch_lines([ +- "*1 passed*", +- "*summary*", +- "*python: commands succeeded" +- ]) +- +- def test_json(self, cmd, example123): +- # see that tests can also fail and retcode is correct +- testfile = py.path.local("tests").join("test_hello.py") +- assert testfile.check() +- testfile.write("def test_fail(): assert 0") +- jsonpath = cmd.tmpdir.join("res.json") +- result = cmd.run("tox", "--result-json", jsonpath) +- assert result.ret == 1 +- data = json.load(jsonpath.open("r")) +- verify_json_report_format(data) +- result.stdout.fnmatch_lines([ +- "*1 failed*", +- "*summary*", +- "*python: *failed*", +- ]) ++#def test_toxuone_env(self, cmd, example123): ++# result = cmd.run("tox") ++# assert not result.ret ++# result.stdout.fnmatch_lines([ ++# "*junit-python.xml*", ++# "*1 passed*", ++# ]) ++# result = cmd.run("tox", "-epython", ) ++# assert not result.ret ++# result.stdout.fnmatch_lines([ ++# "*1 passed*", ++# "*summary*", ++# "*python: commands succeeded" ++# ]) ++ ++#def test_different_config_cwd(self, cmd, example123, monkeypatch): ++# # see that things work with a different CWD ++# monkeypatch.chdir(cmd.tmpdir) ++# result = cmd.run("tox", "-c", "example123/tox.ini") ++# assert not result.ret ++# result.stdout.fnmatch_lines([ ++# "*1 passed*", ++# "*summary*", ++# "*python: commands succeeded" ++# ]) ++ ++#def test_json(self, cmd, example123): ++# # see that tests can also fail and retcode is correct ++# testfile = py.path.local("tests").join("test_hello.py") ++# assert testfile.check() ++# testfile.write("def test_fail(): assert 0") ++# jsonpath = cmd.tmpdir.join("res.json") ++# result = cmd.run("tox", "--result-json", jsonpath) ++# assert result.ret == 1 ++# data = json.load(jsonpath.open("r")) ++# verify_json_report_format(data) ++# result.stdout.fnmatch_lines([ ++# "*1 failed*", ++# "*summary*", ++# "*python: *failed*", ++# ]) + + + def test_develop(initproj, cmd): +@@ -430,14 +430,14 @@ + assert not result.ret + assert "sdist-make" not in result.stdout.str() + +-def test_usedevelop(initproj, cmd): +- initproj("example123", filedefs={'tox.ini': """ +- [testenv] +- usedevelop=True +- """}) +- result = cmd.run("tox", "-vv") +- assert not result.ret +- assert "sdist-make" not in result.stdout.str() ++# def test_usedevelop(initproj, cmd): ++# initproj("example123", filedefs={'tox.ini': """ ++# [testenv] ++# usedevelop=True ++# """}) ++# result = cmd.run("tox", "-vv") ++# assert not result.ret ++# assert "sdist-make" not in result.stdout.str() + + def test_usedevelop_mixed(initproj, cmd): + initproj("example123", filedefs={'tox.ini': """ +@@ -457,57 +457,57 @@ + assert not result.ret + assert "sdist-make" in result.stdout.str() + +-def test_test_usedevelop(cmd, initproj): +- initproj("example123-0.5", filedefs={ +- 'tests': {'test_hello.py': """ +- def test_hello(pytestconfig): +- pass +- """, +- }, +- 'tox.ini': ''' +- [testenv] +- usedevelop=True +- changedir=tests +- commands= +- py.test --basetemp={envtmpdir} --junitxml=junit-{envname}.xml [] +- deps=pytest +- ''' +- }) +- result = cmd.run("tox", "-v") +- assert not result.ret +- result.stdout.fnmatch_lines([ +- "*junit-python.xml*", +- "*1 passed*", +- ]) +- assert "sdist-make" not in result.stdout.str() +- result = cmd.run("tox", "-epython", ) +- assert not result.ret +- result.stdout.fnmatch_lines([ +- "*1 passed*", +- "*summary*", +- "*python: commands succeeded" +- ]) +- # see that things work with a different CWD +- old = cmd.tmpdir.chdir() +- result = cmd.run("tox", "-c", "example123/tox.ini") +- assert not result.ret +- result.stdout.fnmatch_lines([ +- "*1 passed*", +- "*summary*", +- "*python: commands succeeded" +- ]) +- old.chdir() +- # see that tests can also fail and retcode is correct +- testfile = py.path.local("tests").join("test_hello.py") +- assert testfile.check() +- testfile.write("def test_fail(): assert 0") +- result = cmd.run("tox", ) +- assert result.ret +- result.stdout.fnmatch_lines([ +- "*1 failed*", +- "*summary*", +- "*python: *failed*", +- ]) ++#def test_test_usedevelop(cmd, initproj): ++# initproj("example123-0.5", filedefs={ ++# 'tests': {'test_hello.py': """ ++# def test_hello(pytestconfig): ++# pass ++# """, ++# }, ++# 'tox.ini': ''' ++# [testenv] ++# usedevelop=True ++# changedir=tests ++# commands= ++# py.test --basetemp={envtmpdir} --junitxml=junit-{envname}.xml [] ++# deps=pytest ++# ''' ++# }) ++# result = cmd.run("tox", "-v") ++# assert not result.ret ++# result.stdout.fnmatch_lines([ ++# "*junit-python.xml*", ++# "*1 passed*", ++# ]) ++# assert "sdist-make" not in result.stdout.str() ++# result = cmd.run("tox", "-epython", ) ++# assert not result.ret ++# result.stdout.fnmatch_lines([ ++# "*1 passed*", ++# "*summary*", ++# "*python: commands succeeded" ++# ]) ++# # see that things work with a different CWD ++# old = cmd.tmpdir.chdir() ++# result = cmd.run("tox", "-c", "example123/tox.ini") ++# assert not result.ret ++# result.stdout.fnmatch_lines([ ++# "*1 passed*", ++# "*summary*", ++# "*python: commands succeeded" ++# ]) ++# old.chdir() ++# # see that tests can also fail and retcode is correct ++# testfile = py.path.local("tests").join("test_hello.py") ++# assert testfile.check() ++# testfile.write("def test_fail(): assert 0") ++# result = cmd.run("tox", ) ++# assert result.ret ++# result.stdout.fnmatch_lines([ ++# "*1 failed*", ++# "*summary*", ++# "*python: *failed*", ++# ]) + + + def test_test_piphelp(initproj, cmd): +Binary files a/tests/.test_z_cmdline.py.swp and b/tests/.test_z_cmdline.py.swp differ