2017-10-12 13:48:30 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-testfixtures
|
|
|
|
#
|
2021-04-28 06:51:54 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2017-10-12 13:48:30 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 14:09:00 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-01-05 10:23:12 +00:00
|
|
|
#
|
2017-10-12 13:48:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-03-12 08:05:40 +00:00
|
|
|
%bcond_without python2
|
2017-10-12 13:48:30 +00:00
|
|
|
Name: python-testfixtures
|
2021-05-09 17:11:57 +00:00
|
|
|
Version: 6.17.1
|
2017-10-12 13:48:30 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: A collection of helpers and mock objects for unit tests and doc tests
|
2018-01-05 10:23:12 +00:00
|
|
|
License: MIT
|
2018-12-04 17:24:21 +00:00
|
|
|
URL: https://github.com/Simplistix/testfixtures
|
2017-10-12 13:48:30 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/testfixtures/testfixtures-%{version}.tar.gz
|
2021-04-28 07:51:06 +00:00
|
|
|
# PATCH-FIX-UPSTREAM: gh#Simplistix/testfixtures/commit/52a14d92a122665b1a101e6398eca3982de01739
|
|
|
|
Patch0: appease-django-320.patch
|
2019-02-14 08:31:46 +00:00
|
|
|
BuildRequires: %{python_module Django}
|
|
|
|
BuildRequires: %{python_module Twisted}
|
2020-03-12 08:05:40 +00:00
|
|
|
BuildRequires: %{python_module pytest >= 3.6}
|
2017-10-12 13:48:30 +00:00
|
|
|
BuildRequires: %{python_module pytest-django}
|
2020-03-12 08:05:40 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-01-05 10:23:12 +00:00
|
|
|
BuildRequires: %{python_module sybil}
|
|
|
|
BuildRequires: %{python_module zope.component}
|
2020-03-12 08:05:40 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-02-14 08:31:46 +00:00
|
|
|
Suggests: python-Django
|
|
|
|
Suggests: python-Twisted
|
|
|
|
Suggests: python-sybil
|
|
|
|
Suggests: python-zope.component
|
|
|
|
BuildArch: noarch
|
2020-03-12 08:05:40 +00:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
%endif
|
2017-10-12 13:48:30 +00:00
|
|
|
%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}
|
2021-04-28 07:51:06 +00:00
|
|
|
%autopatch -p1
|
2019-03-28 08:41:18 +00:00
|
|
|
chmod a-x docs/*.txt
|
2017-10-12 13:48:30 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2019-03-28 08:41:18 +00:00
|
|
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/testfixtures/tests
|
2017-10-12 13:48:30 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2019-02-14 08:31:46 +00:00
|
|
|
export DJANGO_SETTINGS_MODULE=testfixtures.tests.test_django.settings
|
2020-06-23 16:47:41 +00:00
|
|
|
export PYTHONPATH=$(pwd)
|
2021-04-28 07:51:06 +00:00
|
|
|
%pytest testfixtures/tests
|
2017-10-12 13:48:30 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
2018-12-04 17:24:21 +00:00
|
|
|
%license LICENSE.txt
|
2019-03-28 08:41:18 +00:00
|
|
|
%doc README.rst docs/*.txt
|
2017-10-12 13:48:30 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|