14
0
Files
python-testfixtures/python-testfixtures.spec

81 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-testfixtures
#
Accepting request 783805 from home:pgajdos:python - version update to 6.14.0 6.14.0 (24 Feb 2020) -------------------- - Add support for non-deterministic logging order when using :meth:`twisted.LogCapture`. 6.13.1 (20 Feb 2020) -------------------- - Fix for using :func:`compare` to compare two-element :func:`~unittest.mock.call` objects. 6.13.0 (18 Feb 2020) -------------------- - Allow any attributes that need to be ignored to be specified directly when calling :func:`~testfixtures.comparison.compare_object`. This is handy when writing comparers for :func:`compare`. 6.12.1 (16 Feb 2020) -------------------- - Fix a bug that occured when using :func:`compare` to compare a string with a slotted object that had the same :func:`repr` as the string. 6.12.0 (6 Feb 2020) ------------------- - Add support for ``universal_newlines``, ``text``, ``encoding`` and ``errors`` to :class:`popen.MockPopen`, but only for Python 3. 6.11.0 (29 Jan 2020) -------------------- - :class:`decimal.Decimal` now has better representation when :func:`compare` displays a failed comparison, particularly on Python 2. - Add support to :func:`compare` for explicitly naming objects to be compared as ``x`` and ``y``. This allows symmetry with the ``x_label`` and ``y_label`` parameters that are now documented. - Restore ability for :class:`Comparison` to compare properties and methods, although these uses are not recommended. 6.10.3 (22 Nov 2019) OBS-URL: https://build.opensuse.org/request/show/783805 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testfixtures?expand=0&rev=22
2020-03-11 12:48:53 +00:00
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-testfixtures
Version: 6.17.0
Release: 0
Summary: A collection of helpers and mock objects for unit tests and doc tests
License: MIT
URL: https://github.com/Simplistix/testfixtures
Source: https://files.pythonhosted.org/packages/source/t/testfixtures/testfixtures-%{version}.tar.gz
BuildRequires: %{python_module Django}
BuildRequires: %{python_module Twisted}
BuildRequires: %{python_module pytest >= 3.6}
BuildRequires: %{python_module pytest-django}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module sybil}
BuildRequires: %{python_module zope.component}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Suggests: python-Django
Suggests: python-Twisted
Suggests: python-sybil
Suggests: python-zope.component
BuildArch: noarch
%if %{with python2}
BuildRequires: python2-mock
%endif
%python_subpackages
%description
TestFixtures is a collection of helpers and mock objects that are
useful when writing unit tests or doc tests.
If you're wondering why "yet another mock object library", testing is
often described as an art form and as such some styles of library will
suit some people while others will suit other styles. This library
contains common test fixtures the author found himself
repeating from package to package and so decided to extract them into
their own library and give them some tests of their own!
%prep
%setup -q -n testfixtures-%{version}
chmod a-x docs/*.txt
%build
%python_build
%install
%python_install
%python_expand rm -r %{buildroot}%{$python_sitelib}/testfixtures/tests
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export DJANGO_SETTINGS_MODULE=testfixtures.tests.test_django.settings
export PYTHONPATH=$(pwd)
%pytest testfixtures/tests
%files %{python_files}
%license LICENSE.txt
%doc README.rst docs/*.txt
%{python_sitelib}/*
%changelog