- Remove python_module macro definition

- Use autosetup instead of setup + autopatch
- Remove reintroduce-slave-terminology.patch
- Remove 0001-Revert-Remove-compat-for-pytest-6.patch
- Update to 3.0.2:
  # Bug Fixes
  * #813: Cancel shutdown when a crashed worker is restarted.
  # Deprecations
  * #825: The --rsyncdir command line argument and rsyncdirs config variable
    are deprecated.
  * The rsync feature will be removed in pytest-xdist 4.0.
  * #826: The --looponfail command line argument and looponfailroots config
    variable are deprecated.
  * The loop-on-fail feature will be removed in pytest-xdist 4.0.
  # Improved Documentation
  * #791: Document the pytest_xdist_auto_num_workers hook.
  * #796: Added known limitations section to documentation.
  * #829: Document the -n logical option.
  # Features
  * #792: The environment variable PYTEST_XDIST_AUTO_NUM_WORKERS can now be
    used to specify the default for -n auto and -n logical.
  * #812: Partially restore old initial batch distribution algorithm in
    LoadScheduling.
  * pytest orders tests for optimal sequential execution - i. e. avoiding
    unnecessary setup and teardown of fixtures. So executing tests in
    consecutive chunks is important for optimal performance.
  * In v1.14, initial test distribution in LoadScheduling was changed to
    round-robin, optimized for the corner case, when the number of tests is
    less than 2 * number of nodes. At the same time, it became worse for all
    other cases.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-xdist?expand=0&rev=27
This commit is contained in:
2022-11-30 08:08:07 +00:00
committed by Git OBS Bridge
parent c9d5ba2911
commit d3708f49fe
6 changed files with 73 additions and 252 deletions

View File

@@ -16,32 +16,26 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-pytest-xdist
Version: 2.5.0
Version: 3.0.2
Release: 0
Summary: Distributed testing and loop-on-failing for py.test
License: MIT
URL: https://github.com/pytest-dev/pytest-xdist
Source0: https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest-xdist-%{version}.tar.gz
# 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
BuildRequires: %{python_module execnet >= 1.1}
BuildRequires: %{python_module filelock}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module psutil >= 3.0.0}
BuildRequires: %{python_module pytest >= 4.4.0}
BuildRequires: %{python_module pytest-forked}
BuildRequires: %{python_module setuptools_scm >= 6.0}
BuildRequires: %{python_module pytest >= 6.2.0}
BuildRequires: %{python_module setuptools_scm >= 6.2.3}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-execnet >= 1.1
Requires: python-pytest >= 4.4.0
Requires: python-pytest-forked
Requires: python-pytest >= 6.2.0
Suggests: python-psutil >= 3.0.0
BuildArch: noarch
%python_subpackages
@@ -71,25 +65,23 @@ are reported back and displayed to your local terminal.
You may specify different Python versions and interpreters.
%prep
%setup -q -n pytest-xdist-%{version}
%autopatch -p1
%autosetup -p1 -n pytest-xdist-%{version}
sed -i 's/\r//' README.rst
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# https://github.com/pytest-dev/pytest-xdist/issues/601
%pytest -k "not test_warning_captured_deprecated_in_pytest_6"
%pytest
%files %{python_files}
%doc CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/xdist
%{python_sitelib}/pytest_xdist-%{version}-py%{python_version}.egg-info
%{python_sitelib}/pytest_xdist-%{version}*-info
%changelog