File python-testfixtures.spec of Package python-testfixtures
#
# spec file for package python-testfixtures
#
# Copyright (c) 2018 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-%{**}}
# Test is disabled. It fails.
%bcond_with test
Name: python-testfixtures
Version: 5.3.1
Release: 0
Summary: A collection of helpers and mock objects for unit tests and doc tests
License: MIT
Group: Development/Languages/Python
Url: https://github.com/Simplistix/testfixtures
Source: https://files.pythonhosted.org/packages/source/t/testfixtures/testfixtures-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pkginfo}
BuildRequires: %{python_module setuptools-git}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module twine}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module coveralls}
BuildRequires: %{python_module django-core}
BuildRequires: %{python_module django-nose}
BuildRequires: %{python_module django}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pytest-django}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module sybil}
BuildRequires: %{python_module virtualenv}
BuildRequires: %{python_module zope.component}
%endif
BuildArch: noarch
%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}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%{python_sitelib}/*
%changelog