python-pytest-django/python-pytest-django.spec

70 lines
2.5 KiB
RPMSpec

#
# spec file for package python-pytest-django
#
# 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-pytest-django
Version: 3.1.2
Release: 0
Summary: A Django plugin for py.test
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://pytest-django.readthedocs.org/
Source: https://files.pythonhosted.org/packages/source/p/pytest-django/pytest-django-%{version}.tar.gz
Patch: python-pytest-django-dependency.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest >= 2.9.2}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
pytest-django allows you to test your Django project/applications with the
`pytest testing tool.
Running your test suite with pytest-django allows you to tap into the features
that are already present in pytest. Here are some advantages:
* Manage test dependencies with pytest fixtures.
* Less boilerplate tests: no need to import unittest, create a subclass with methods. Write tests as regular functions.
* Database re-use: no need to re-create the test database for every test run.
* Run tests in multiple processes for increased speed (with the pytest-xdist plugin).
* Make use of other pytest plugins.
* Works with both worlds: Existing unittest-style TestCase's still work without any modifications.
%prep
%setup -q -n pytest-django-%{version}
%patch -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE
%{python_sitelib}/*
%changelog