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

73 lines
2.3 KiB
RPMSpec

#
# spec file for package python-pyshould
#
# 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-%{**}}
Name: python-pyshould
Version: 0.7.1
Release: 0
License: MIT
Summary: Should style asserts
Url: https://github.com/drslump/pyshould
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pyshould/pyshould-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module hamcrest}
BuildRequires: %{python_module nose}
# /SECTION
Requires: python-hamcrest
BuildArch: noarch
%python_subpackages
%description
PyShould is a Python DSL allowing to write expectations or assertions
in almost natural language. The goal is to offer an expressive yet
readable syntax to define the expectations in detail.
Under the hood it uses the PyHamcrest library of matchers to build
complex matching predicates and great explanations when there is a
mismatch.
Its primary use case is in unit testing, replacing the need for
Python's native assertX methods. Its use is completely transparent
to the unit testing runner used, since mismatches are reported using
the standard AssertionError.
%prep
%setup -q -n pyshould-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py test
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*
%changelog