1
0
python-pytest-xdist/python-pytest-xdist.spec

89 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-pytest-xdist
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%{?sle15_python_module_pythons}
Name: python-pytest-xdist
Version: 3.6.1
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
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module execnet >= 1.1}
BuildRequires: %{python_module filelock}
- 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
2022-11-30 09:08:07 +01:00
BuildRequires: %{python_module pip}
BuildRequires: %{python_module psutil >= 3.0.0}
- 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
2022-11-30 09:08:07 +01:00
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
- 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
2022-11-30 09:08:07 +01:00
Requires: python-pytest >= 6.2.0
Suggests: python-psutil >= 3.0.0
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 "rsyncs" 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
%autosetup -p1 -n pytest_xdist-%{version}
sed -i 's/\r//' README.rst
%build
- 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
2022-11-30 09:08:07 +01:00
%pyproject_wheel
%install
- 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
2022-11-30 09:08:07 +01:00
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
- 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
2022-11-30 09:08:07 +01:00
%pytest
%files %{python_files}
%doc CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/xdist
- 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
2022-11-30 09:08:07 +01:00
%{python_sitelib}/pytest_xdist-%{version}*-info
%changelog