Files
python-pytest/python-pytest.spec
Ondřej Súkup aab09e1cd9 Accepting request 636145 from home:mimi_vx:branches:devel:languages:python:pytest
- update to 3.8.0
 * Config.warn has been deprecated, it should be replaced by calls
    to the standard warnings.warn.
 * Node.warn now supports two signatures:
     + node.warn(PytestWarning("some message")): is now the recommended way
        to call this function. The warning instance must be a PytestWarning
        or subclass instance.
     + node.warn("CI", "some message"): this code/message form is now deprecated
        and should be converted to the warning instance form above.
 * RemovedInPytest4Warning and PytestExperimentalApiWarning are now part
     of the public API and should be accessed using pytest.RemovedInPytest4Warning
     and pytest.PytestExperimentalApiWarning.
 * @pytest.mark.filterwarnings second parameter is no longer regex-escaped,
     making it possible to actually use regular expressions to check the warning message.
    + Note: regex-escaping the match string was an implementation oversight
        that might break test suites which depend on the old behavior.
 * Internal pytest warnings are now issued using the standard warnings module,
     making it possible to use the standard warnings filters to manage those
     warnings. This introduces PytestWarning, PytestDeprecationWarning
     and RemovedInPytest4Warning warning types as part of the public API.
 * DeprecationWarning and PendingDeprecationWarning are now shown by default
     if no other warning filter is configured. This makes pytest more compliant
     with PEP-0506. See the docs for more info.
 * Warnings are now captured and displayed during test collection.
 * PYTEST_DISABLE_PLUGIN_AUTOLOAD environment variable disables
    plugin auto-loading when set.
 * Added the count option to console_output_style to enable displaying
    the progress as a count instead of a percentage.
 * Added support for ‘xfailed’ and ‘xpassed’ outcomes
    to the pytester.RunResult.assert_outcomes signature.

OBS-URL: https://build.opensuse.org/request/show/636145
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=15
2018-09-17 09:46:23 +00:00

99 lines
3.2 KiB
RPMSpec

#
# spec file for package python-pytest
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest
Version: 3.8.0
Release: 0
Summary: Python testing tool with autodiscovery and detailed asserts
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pytest-dev/pytest
Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
BuildRequires: %{python_module setuptools_scm}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-atomicwrites
Requires: python-attrs >= 17.4.0
Requires: python-more-itertools >= 4.0.0
Requires: python-pluggy >= 0.7
Requires: python-py >= 1.5.0
Requires: python-setuptools
Requires: python-six >= 1.10.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%ifpython2
Requires: python-funcsigs
%endif
%if "%{python_flavor}" == "python2" || %{python3_version_nodots} < 36
Requires: python-pathlib2 >= 2.2.0
%endif
%python_subpackages
%description
pytest is a cross-project Python testing tool. It provides:
* auto-discovery of test modules and functions,
* detailed info on failing assert statements (no need to remember
self.assert* names),
* modular fixtures for managing small or parametrized long-lived test resources.
* multi-paradigm support: you can use py.test to run test suites based on
unittest (or trial), nose,
* single-source compatibility to Python2.4 all the way up to Python3.3,
PyPy-1.9 and Jython-2.5.1, and
* many external plugins.
%prep
%setup -q -n pytest-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/py.test
%python_clone -a %{buildroot}%{_bindir}/pytest
if [ -x %{buildroot}%{_bindir}/py.test-%{python2_bin_suffix} ]; then
ln -s py.test-%{python2_bin_suffix} %{buildroot}%{_bindir}/py.test2
fi
if [ -x %{buildroot}%{_bindir}/py.test-%{python3_bin_suffix} ]; then
ln -s py.test-%{python3_bin_suffix} %{buildroot}%{_bindir}/py.test3
fi
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%{python_install_alternative py.test} \
--slave %{_bindir}/pytest pytest %{_bindir}/pytest-%{python_version}
%postun
%python_uninstall_alternative py.test
%files %{python_files}
%doc AUTHORS CHANGELOG.rst README.rst
%license LICENSE
%python_alternative %{_bindir}/py.test
%python_alternative %{_bindir}/pytest
%python2_only %{_bindir}/py.test2
%python3_only %{_bindir}/py.test3
%{python_sitelib}/*
%changelog