From c46c53a3c34e54475d19cd5448b8b2c40e04a5a6f14e1fe2116fd53a8060eaff Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 16 Mar 2017 12:42:12 +0000 Subject: [PATCH] Accepting request 479979 from home:tbechtold:branches:devel:languages:python - update to 1.5.3: - ``patch.multiple`` now works. - Using setup/teardown instead of setup_method/teardown_method was a bad idea. - 1.5.0 had a left over print statement :blush: - Pytest: When decorating classes using the ``skip.*`` and ``mock.*`` decorators, these now augment ``cls.setup``/``cls.teardown`` instead of ``cls.setup_method``/``cls.teardown_method``. - Pytest: Adds ``patching.object``. - Adds new helper: ``case.pytest.fixture_with_options``. - All case decorators now works with py.test classes. - Py.test: Adds new `stdouts` fixture that patches :data:`sys.stdout`, and :data:`sys.stderr`. - Py.test: The `patching` fixture can now mock modules. - Case is now a py.test plug-in and provides a `patching` fixture as a shortcut to `monkeypatch` setting the value to a mock. - Case decorators now supports py.test. - Patcher created by create_patcher now accepts *args. - ``mock.reload_modules``: Fixed compatibility with Python 3. - ``mock.reload_modules`` now re-imports the module and calls ``reload()`` on it. - Adds ``mock.mute`` decorator to suppress stdout with no return value. - Adds ``Mock.on_nth_call_do_raise(excA, excB, n)``. - Fix license - Convert to singlespec approach OBS-URL: https://build.opensuse.org/request/show/479979 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-case?expand=0&rev=2 --- case-1.1.4.tar.gz | 3 --- case-1.5.3.tar.gz | 3 +++ python-case.changes | 28 ++++++++++++++++++++++++++++ python-case.spec | 44 ++++++++++++++++++++++++++------------------ 4 files changed, 57 insertions(+), 21 deletions(-) delete mode 100644 case-1.1.4.tar.gz create mode 100644 case-1.5.3.tar.gz diff --git a/case-1.1.4.tar.gz b/case-1.1.4.tar.gz deleted file mode 100644 index 2eb01ae..0000000 --- a/case-1.1.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a23bae76b1dbe11c319d0ef23d8b8c91a660c092f25169ecead782fd5af558e5 -size 55298 diff --git a/case-1.5.3.tar.gz b/case-1.5.3.tar.gz new file mode 100644 index 0000000..313ac4b --- /dev/null +++ b/case-1.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48432b01d91913451c3512c5b90e31b0f348f1074b166a3431085eb70d784fb1 +size 58469 diff --git a/python-case.changes b/python-case.changes index b4078aa..19c4578 100644 --- a/python-case.changes +++ b/python-case.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Wed Mar 15 10:57:58 UTC 2017 - tbechtold@suse.com + +- update to 1.5.3: + - ``patch.multiple`` now works. + - Using setup/teardown instead of setup_method/teardown_method was a bad idea. + - 1.5.0 had a left over print statement :blush: + - Pytest: When decorating classes using the ``skip.*`` and ``mock.*`` + decorators, these now augment ``cls.setup``/``cls.teardown`` instead of + ``cls.setup_method``/``cls.teardown_method``. + - Pytest: Adds ``patching.object``. + - Adds new helper: ``case.pytest.fixture_with_options``. + - All case decorators now works with py.test classes. + - Py.test: Adds new `stdouts` fixture that patches :data:`sys.stdout`, + and :data:`sys.stderr`. + - Py.test: The `patching` fixture can now mock modules. + - Case is now a py.test plug-in and provides a `patching` fixture + as a shortcut to `monkeypatch` setting the value to a mock. + - Case decorators now supports py.test. + - Patcher created by create_patcher now accepts *args. + - ``mock.reload_modules``: Fixed compatibility with Python 3. + - ``mock.reload_modules`` now re-imports the module and + calls ``reload()`` on it. + - Adds ``mock.mute`` decorator to suppress stdout with no return value. + - Adds ``Mock.on_nth_call_do_raise(excA, excB, n)``. +- Fix license +- Convert to singlespec approach + ------------------------------------------------------------------- Fri Jun 3 17:12:53 UTC 2016 - tbechtold@suse.com diff --git a/python-case.spec b/python-case.spec index 0d5525b..90ada45 100644 --- a/python-case.spec +++ b/python-case.spec @@ -1,7 +1,7 @@ # # spec file for package python-case # -# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -13,29 +13,37 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-case -Version: 1.1.4 +Version: 1.5.3 Release: 0 -License: BSD Summary: Python unittest Utilities -Url: http://github.com/celery/case +License: BSD-3-Clause Group: Development/Languages/Python +Url: http://github.com/celery/case Source: https://pypi.io/packages/source/c/case/case-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: python-coverage -BuildRequires: python-mock -BuildRequires: python-nose -BuildRequires: python-six -BuildRequires: python-unittest2 -Requires: python-mock -Requires: python-nose +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module nose} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six} +BuildRequires: python-rpm-macros +BuildRequires: python2-unittest2 +Requires: python-mock >= 2.0 +Requires: python-nose >= 1.3.7 +Requires: python-setuptools Requires: python-six -Requires: python-unittest2 +%ifpython2 +Requires: python-unittest2 >= 0.5.1 +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +%python_subpackages + %description Python unittest Utilities @@ -43,15 +51,15 @@ Python unittest Utilities %setup -q -n case-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install %check -python setup.py test +%python_exec setup.py test -%files +%files %python_files %defattr(-,root,root,-) %doc Changelog LICENSE README.rst %{python_sitelib}/*