2017-05-06 16:27:21 +00:00
#
# spec file for package python-pytest-xdist
#
2022-01-17 06:28:23 +00:00
# Copyright (c) 2022 SUSE LLC
2017-05-06 16:27:21 +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-11-08 08:39:21 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2017-05-06 16:27:21 +00:00
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2020-08-25 08:26:18 +00:00
%define skip_python2 1
2017-05-06 16:27:21 +00:00
Name : python-pytest-xdist
2022-01-17 06:28:23 +00:00
Version : 2.5.0
2017-05-06 16:27:21 +00:00
Release : 0
Summary : Distributed testing and loop-on-failing for py.test
License : MIT
2020-01-06 12:54:09 +00:00
URL : https://github.com/pytest-dev/pytest-xdist
2017-11-17 09:54:54 +00:00
Source0 : https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest-xdist-%{version} .tar.gz
2020-08-31 14:15:07 +00:00
# This is actually revert of something upstream wanted to do a long time ago, but was waiting for the rest of pytest to sync with them.
# It is only a terminology change, but one that has personal meaning for many people. On the other hand, it was breaking compatibility with pytest < 6.
# In my opinion it would be inadequate to send this patch upstream.
Patch0 : reintroduce-slave-terminology.patch
# minor compatibility revert
Patch1 : 0001-Revert-Remove-compat-for-pytest-6.patch
2019-02-12 15:28:48 +00:00
BuildRequires : %{python_module execnet >= 1.1}
BuildRequires : %{python_module filelock}
2020-08-25 08:26:18 +00:00
BuildRequires : %{python_module psutil >= 3.0.0}
2020-08-31 14:15:07 +00:00
BuildRequires : %{python_module pytest >= 4.4.0}
2019-02-12 15:28:48 +00:00
BuildRequires : %{python_module pytest-forked}
2022-01-17 06:28:23 +00:00
BuildRequires : %{python_module setuptools_scm >= 6.0}
2017-05-06 16:27:21 +00:00
BuildRequires : fdupes
BuildRequires : python-rpm-macros
Requires : python-execnet >= 1.1
2020-08-31 14:15:07 +00:00
Requires : python-pytest >= 4.4.0
2017-11-17 09:54:54 +00:00
Requires : python-pytest-forked
2020-08-31 14:15:07 +00:00
Suggests : python-psutil >= 3.0.0
2017-05-06 16:27:21 +00:00
BuildArch : noarch
%python_subpackages
%description
The `pytest-xdist`_ plugin extends py.test with some unique
test execution modes:
* test run parallelization_: if you have multiple CPUs or hosts you can use
those for a combined test run. This allows to speed up
development or to use special resources of `remote machines`_.
* ``--boxed``: (not available on Windows) run each test in a boxed_
subprocess to survive ``SEGFAULTS`` or otherwise dying processes
* ``--looponfail``: run your tests repeatedly in a subprocess. After each run
py.test waits until a file in your project changes and then re-runs
the previously failing tests. This is repeated until all tests pass
after which again a full run is performed.
* `Multi-Platform`_ coverage: you can specify different Python interpreters
or different platforms and run tests in parallel on all of them.
Before running tests remotely, ``py.test`` efficiently " r s y n c s " your
program source code to the remote place. All test results
are reported back and displayed to your local terminal.
You may specify different Python versions and interpreters.
%prep
%setup -q -n pytest-xdist-%{version}
2020-08-31 14:15:07 +00:00
%autopatch -p1
2018-11-08 08:39:21 +00:00
sed -i 's/\r//' README.rst
2017-05-06 16:27:21 +00:00
%build
%python_build
%install
%python_install
2020-05-13 09:10:14 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2017-05-06 16:27:21 +00:00
2019-02-12 15:28:48 +00:00
%check
2020-10-13 11:51:55 +00:00
# https://github.com/pytest-dev/pytest-xdist/issues/601
%pytest -k " n o t t e s t _ w a r n i n g _ c a p t u r e d _ d e p r e c a t e d _ i n _ p y t e s t _ 6 "
2019-02-12 15:28:48 +00:00
2017-05-06 16:27:21 +00:00
%files %{python_files}
2020-08-25 08:26:18 +00:00
%doc CHANGELOG.rst README.rst
2018-02-25 10:47:16 +00:00
%license LICENSE
2017-05-06 16:27:21 +00:00
%{python_sitelib} /xdist
%{python_sitelib} /pytest_xdist-%{version} -py%{python_version} .egg-info
%changelog