Files
python-case/python-case.spec
Dirk Mueller c46c53a3c3 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 😊
  - 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
2017-03-16 12:42:12 +00:00

68 lines
1.9 KiB
RPMSpec

#
# spec file for package python-case
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# 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.5.3
Release: 0
Summary: Python unittest Utilities
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_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
%ifpython2
Requires: python-unittest2 >= 0.5.1
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Python unittest Utilities
%prep
%setup -q -n case-%{version}
%build
%python_build
%install
%python_install
%check
%python_exec setup.py test
%files %python_files
%defattr(-,root,root,-)
%doc Changelog LICENSE README.rst
%{python_sitelib}/*
%changelog