# # spec file for package python-pytest-xdist # # 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-pytest-xdist Version: 1.22.1 Release: 1.1 Summary: Distributed testing and loop-on-failing for py.test License: MIT Group: Development/Languages/Python Url: https://bitbucket.org/pytest-dev/pytest-xdist Source0: https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest-xdist-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-execnet >= 1.1 Requires: python-pytest >= 3.0.0 Requires: python-pytest-forked 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 %setup -q -n pytest-xdist-%{version} # disable failing tests (we cannot deal with too narrow deps here..) dos2unix README.rst %build %python_build %install %python_install %python_expand %fdupes -s %{buildroot}%{$python_sitelib} %files %{python_files} %doc CHANGELOG.rst ISSUES.txt README.rst %license LICENSE %{python_sitelib}/xdist %{python_sitelib}/pytest_xdist-%{version}-py%{python_version}.egg-info %changelog * Sat Feb 24 2018 mimi.vx@gmail.com - cleanup Requires and spec * Sat Feb 24 2018 arun@gmx.de - update to version 1.22.1: * Bug Fixes + Fix issue when using loadscope or loadfile where tests would fail to start if the first scope had only one test. (#257) * Trivial Changes + Change terminology used by pytest-xdist to master and worker in arguments and messages (for example --max-worker-reset). (#234) * Thu Jan 11 2018 arun@gmx.de - update to version 1.22.0: * Add support for the pytest_runtest_logfinish hook which will be released in pytest 3.4. (#266) * Wed Jan 3 2018 arun@gmx.de - update to version 1.21.0: * Deprecations and Removals + Drop support for EOL Python 2.6. (#259) * Features + New --dist=loadfile option which load-distributes test to workers grouped by the file the tests live in. (#242) * Bug Fixes + Fix accidental mutation of test report during serialization causing longrepr string-ification to break. (#241) * Wed Nov 15 2017 mimi.vx@gmail.com - new pytest-xdist requires pytest-forked package * Sat Nov 11 2017 arun@gmx.de - specfile: * CHANGELOG->CHANGELOG.rst * update pytest version requirement to 3.0.0 - update to version 1.20.1: * Bug Fixes + Fix hang when all worker nodes crash and restart limit is reached (#45) + Fix issue where the -n option would still run distributed tests when pytest was run with the --collect-only option (#5) - changes from version 1.20.0: * Features + xdist now supports tests to log results multiple times, improving integration with plugins which require it like pytest-rerunfailures and flaky. (#206) * Bug Fixes + Fix issue where tests were being incorrectly identified if a worker crashed during the teardown stage of the test. (#124) - changes from version 1.19.1: * Bug Fixes + Fix crash when transferring internal pytest warnings from workers to the master node. (#214) - changes from version 1.19.0: * Deprecations and Removals + --boxed functionality has been moved to a separate plugin, pytest-forked. This release now depends on " pytest-forked" and provides --boxed as a backward compatibility option. (#1) * Features + New --dist=loadscope option: sends group of related tests to the same worker. Tests are grouped by module for test functions and by class for test methods. See README.rst for more information. (#191) + Warnings are now properly transferred from workers to the master node. (#92) * Bug Fixes + Fix serialization of native tracebacks (--tb=native). (#196) - changes from version 1.18.2: * Bug Fixes + Removal of unnecessary dependency on incorrect version of py. (#105) + Fix bug in internal event-loop error handler in the master node. This bug would shadow the original errors making extremely hard/impossible for users to diagnose the problem properly. (#175) - changes from version 1.18.1 : * Bug Fixes + Fixed serialization of longrepr.sections during error reporting from workers. (#171) + Fix ReprLocal not being unserialized breaking --showlocals usages. (#176) - changes from version 1.18.0 : * pytest-xdist now requires pytest>=3.0.0. * Features + Add long option --numprocesses as alternative for -n. (#168) * Bug Fixes + Fix serialization and deserialization dropping longrepr details. (#133) - changes from version 1.17.1 : * Bug Fixes + Hot fix release reverting the change introduced by #124, unfortunately it broke a number of test suites so we are reversing this change while we investigate the problem. (#157) * Improved Documentation + Introduced towncrier for CHANGELOG management. (#154) + Added HOWTORELEASE documentation. (#155) - changes from version 1.17.0: * fix #124: xdist would mark test as complete after 'call' step. As a result, xdist could identify the wrong test as failing when test crashes at teardown. To address this issue, xdist now marks test as complete at teardown. - changes from version 1.16.0: * pytest-xdist now requires pytest 2.7 or later. * Add worker_id attribute in the TestReport * new hook: pytest_xdist_make_scheduler(config, log), can return custom tests items distribution logic implementation. You can take a look at built-in LoadScheduling and EachScheduling implementations. Note that required scheduler class public API may change in next pytest-xdist versions. * Sat Apr 22 2017 aloisio@gmx.com - Converted to single-spec - Fix source URL * Wed Jan 18 2017 hpj@urpla.net - fix Source URL * Sun Jan 15 2017 hpj@urpla.net - Update to 1.15.0 - new ``worker_id`` fixture, returns the id of the worker in a test or fixture. Thanks Jared Hellman for the PR. - display progress during collection only when in a terminal, similar to pytest #1397 issue. Thanks Bruno Oliveira for the PR. - fix internal error message when ``--maxfail`` is used (#62, #65). Thanks Collin RM Stocks and Bryan A. Jones for reports and Bruno Oliveira for the PR. - exclude two tests, that fail due to too narrow requirements * Fri May 27 2016 toddrme2178@gmail.com - Update to 1.14 - new hook: ``pytest_xdist_node_collection_finished(node, ids)``, called when a worker has finished collection. Thanks Omer Katz for the request and Bruno Oliveira for the PR. - fix README display on pypi - fix #22: xdist now works if the internal tmpdir plugin is disabled. Thanks Bruno Oliveira for the PR. - fix #32: xdist now works if looponfail or boxed are disabled. Thanks Bruno Oliveira for the PR. * Wed Oct 21 2015 hpj@urpla.net - Update to 1.13.1: - fix a regression -n 0 now disables xdist again - Update to 1.13: - extended the tox matrix with the supported py.test versions - split up the plugin into 3 plugin's to prepare the departure of boxed and looponfail. looponfail will be a part of core and forked boxed will be replaced with a more reliable primitive based on xdist - conforming with new pytest-2.8 behavior of returning non-zero when all tests were skipped or deselected. - new "--max-slave-restart" option that can be used to control maximum number of times pytest-xdist can restart slaves due to crashes. Thanks to Anatoly Bubenkov for the report and Bruno Oliveira for the PR. - release as wheel - "-n" option now can be set to "auto" for automatic detection of number of cpus in the host system. Thanks Suloev Dmitry for the PR. - Update to 1.12: - fix issue594: properly report errors when the test collection is random. Thanks Bruno Oliveira. - some internal test suite adaptation (to become forward compatible with the upcoming pytest-2.8) - Update to 1.11: - fix pytest/xdist issue485 (also depends on py-1.4.22): attach stdout/stderr on --boxed processes that die. - fix pytest/xdist issue503: make sure that a node has usually two items to execute to avoid scoped fixtures to be torn down pre-maturely (fixture teardown/setup is "nextitem" sensitive). Thanks to Andreas Pelme for bug analysis and failing test. - restart crashed nodes by internally refactoring setup handling of nodes. Also includes better code documentation. Many thanks to Floris Bruynooghe for the complete PR. * Fri Jun 13 2014 mvyskocil@opensuse.org - Needs py.test 2.4.2 or higher * Wed Jun 11 2014 mvyskocil@opensuse.org - Update to 1.10 * Sun Jan 19 2014 toms@opensuse.org - Initial version 1.9