{ "info": { "author": "holger krekel and contributors", "author_email": "pytest-dev@python.org,holger@merlinux.eu", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "\n\n.. image:: http://img.shields.io/pypi/v/pytest-xdist.svg\n :alt: PyPI version\n :target: https://pypi.python.org/pypi/pytest-xdist\n\n.. image:: https://img.shields.io/conda/vn/conda-forge/pytest-xdist.svg\n :target: https://anaconda.org/conda-forge/pytest-xdist\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-xdist.svg\n :alt: Python versions\n :target: https://pypi.python.org/pypi/pytest-xdist\n\n.. image:: https://travis-ci.org/pytest-dev/pytest-xdist.svg?branch=master\n :alt: Travis CI build status\n :target: https://travis-ci.org/pytest-dev/pytest-xdist\n\n.. image:: https://ci.appveyor.com/api/projects/status/56eq1a1avd4sdd7e/branch/master?svg=true\n :alt: AppVeyor build status\n :target: https://ci.appveyor.com/project/pytestbot/pytest-xdist\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\nxdist: pytest distributed testing plugin\n========================================\n\nThe `pytest-xdist`_ plugin extends pytest with some unique\ntest execution modes:\n\n* test run parallelization_: if you have multiple CPUs or hosts you can use\n those for a combined test run. This allows to speed up\n development or to use special resources of `remote machines`_.\n\n\n* ``--looponfail``: run your tests repeatedly in a subprocess. After each run\n pytest waits until a file in your project changes and then re-runs\n the previously failing tests. This is repeated until all tests pass\n after which again a full run is performed.\n\n* `Multi-Platform`_ coverage: you can specify different Python interpreters\n or different platforms and run tests in parallel on all of them.\n\nBefore running tests remotely, ``pytest`` efficiently \"rsyncs\" your\nprogram source code to the remote place. All test results\nare reported back and displayed to your local terminal.\nYou may specify different Python versions and interpreters.\n\nIf you would like to know how pytest-xdist works under the covers, checkout\n`OVERVIEW `_.\n\n\nInstallation\n------------\n\nInstall the plugin with::\n\n pip install pytest-xdist\n\nor use the package in develop/in-place mode with\na checkout of the `pytest-xdist repository`_ ::\n\n pip install --editable .\n\n.. _parallelization:\n\nSpeed up test runs by sending tests to multiple CPUs\n----------------------------------------------------\n\nTo send tests to multiple CPUs, type::\n\n pytest -n NUM\n\nEspecially for longer running tests or tests requiring\na lot of I/O this can lead to considerable speed ups. This option can\nalso be set to ``auto`` for automatic detection of the number of CPUs.\n\nIf a test crashes the interpreter, pytest-xdist will automatically restart\nthat worker and report the failure as usual. You can use the\n``--max-worker-restart`` option to limit the number of workers that can\nbe restarted, or disable restarting altogether using ``--max-worker-restart=0``.\n\nBy default, the ``-n`` option will send pending tests to any worker that is available, without\nany guaranteed order, but you can control this with these options:\n\n* ``--dist=loadscope``: tests will be grouped by **module** for *test functions* and\n by **class** for *test methods*, then each group will be sent to an available worker,\n guaranteeing that all tests in a group run in the same process. This can be useful if you have\n expensive module-level or class-level fixtures. Currently the groupings can't be customized,\n with grouping by class takes priority over grouping by module.\n This feature was added in version ``1.19``.\n\n* ``--dist=loadfile``: tests will be grouped by file name, and then will be sent to an available\n worker, guaranteeing that all tests in a group run in the same worker. This feature was added\n in version ``1.21``.\n\n\nRunning tests in a Python subprocess\n------------------------------------\n\nTo instantiate a python3.5 subprocess and send tests to it, you may type::\n\n pytest -d --tx popen//python=python3.5\n\nThis will start a subprocess which is run with the ``python3.5``\nPython interpreter, found in your system binary lookup path.\n\nIf you prefix the --tx option value like this::\n\n --tx 3*popen//python=python3.5\n\nthen three subprocesses would be created and tests\nwill be load-balanced across these three processes.\n\n.. _boxed:\n\nRunning tests in a boxed subprocess\n-----------------------------------\n\nThis functionality has been moved to the\n`pytest-forked `_ plugin, but the ``--boxed`` option\nis still kept for backward compatibility.\n\n.. _`remote machines`:\n\nSending tests to remote SSH accounts\n------------------------------------\n\nSuppose you have a package ``mypkg`` which contains some\ntests that you can successfully run locally. And you\nhave a ssh-reachable machine ``myhost``. Then\nyou can ad-hoc distribute your tests by typing::\n\n pytest -d --tx ssh=myhostpopen --rsyncdir mypkg mypkg\n\nThis will synchronize your :code:`mypkg` package directory\nto a remote ssh account and then locally collect tests\nand send them to remote places for execution.\n\nYou can specify multiple :code:`--rsyncdir` directories\nto be sent to the remote side.\n\n.. note::\n\n For pytest to collect and send tests correctly\n you not only need to make sure all code and tests\n directories are rsynced, but that any test (sub) directory\n also has an :code:`__init__.py` file because internally\n pytest references tests as a fully qualified python\n module path. **You will otherwise get strange errors**\n during setup of the remote side.\n\n\nYou can specify multiple :code:`--rsyncignore` glob patterns\nto be ignored when file are sent to the remote side.\nThere are also internal ignores: :code:`.*, *.pyc, *.pyo, *~`\nThose you cannot override using rsyncignore command-line or\nini-file option(s).\n\n\nSending tests to remote Socket Servers\n--------------------------------------\n\nDownload the single-module `socketserver.py`_ Python program\nand run it like this::\n\n python socketserver.py\n\nIt will tell you that it starts listening on the default\nport. You can now on your home machine specify this\nnew socket host with something like this::\n\n pytest -d --tx socket=192.168.1.102:8888 --rsyncdir mypkg mypkg\n\n\n.. _`atonce`:\n.. _`Multi-Platform`:\n\n\nRunning tests on many platforms at once\n---------------------------------------\n\nThe basic command to run tests on multiple platforms is::\n\n pytest --dist=each --tx=spec1 --tx=spec2\n\nIf you specify a windows host, an OSX host and a Linux\nenvironment this command will send each tests to all\nplatforms - and report back failures from all platforms\nat once. The specifications strings use the `xspec syntax`_.\n\n.. _`xspec syntax`: http://codespeak.net/execnet/basics.html#xspec\n\n.. _`socketserver.py`: http://bitbucket.org/hpk42/execnet/raw/2af991418160/execnet/script/socketserver.py\n\n.. _`execnet`: http://codespeak.net/execnet\n\nIdentifying the worker process during a test\n--------------------------------------------\n\n*New in version 1.15.*\n\nIf you need to determine the identity of a worker process in\na test or fixture, you may use the ``worker_id`` fixture to do so:\n\n.. code-block:: python\n\n @pytest.fixture()\n def user_account(worker_id):\n \"\"\" use a different account in each xdist worker \"\"\"\n return \"account_%s\" % worker_id\n\nWhen ``xdist`` is disabled (running with ``-n0`` for example), then\n``worker_id`` will return ``\"master\"``.\n\nAdditionally, worker processes have the following environment variables\ndefined:\n\n* ``PYTEST_XDIST_WORKER``: the name of the worker, e.g., ``\"gw2\"``.\n* ``PYTEST_XDIST_WORKER_COUNT``: the total number of workers in this session,\n e.g., ``\"4\"`` when ``-n 4`` is given in the command-line.\n\nThe information about the worker_id in a test is stored in the ``TestReport`` as\nwell, under the ``worker_id`` attribute.\n\nAcessing ``sys.argv`` from the master node in workers\n-----------------------------------------------------\n\nTo access the ``sys.argv`` passed to the command-line of the master node, use\n``request.config.workerinput[\"mainargv\"]``.\n\n\nSpecifying test exec environments in an ini file\n------------------------------------------------\n\nYou can use pytest's ini file configuration to avoid typing common options.\nYou can for example make running with three subprocesses your default like this:\n\n.. code-block:: ini\n\n [pytest]\n addopts = -n3\n\nYou can also add default environments like this:\n\n.. code-block:: ini\n\n [pytest]\n addopts = --tx ssh=myhost//python=python3.5 --tx ssh=myhost//python=python3.6\n\nand then just type::\n\n pytest --dist=each\n\nto run tests in each of the environments.\n\n\nSpecifying \"rsync\" dirs in an ini-file\n--------------------------------------\n\nIn a ``tox.ini`` or ``setup.cfg`` file in your root project directory\nyou may specify directories to include or to exclude in synchronisation:\n\n.. code-block:: ini\n\n [pytest]\n rsyncdirs = . mypkg helperpkg\n rsyncignore = .hg\n\nThese directory specifications are relative to the directory\nwhere the configuration file was found.\n\n.. _`pytest-xdist`: http://pypi.python.org/pypi/pytest-xdist\n.. _`pytest-xdist repository`: https://github.com/pytest-dev/pytest-xdist\n.. _`pytest`: http://pytest.org\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pytest-dev/pytest-xdist", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-xdist-debug-for-graingert", "package_url": "https://pypi.org/project/pytest-xdist-debug-for-graingert/", "platform": "linux", "project_url": "https://pypi.org/project/pytest-xdist-debug-for-graingert/", "project_urls": { "Homepage": "https://github.com/pytest-dev/pytest-xdist" }, "release_url": "https://pypi.org/project/pytest-xdist-debug-for-graingert/0.0.1/", "requires_dist": [ "execnet (>=1.1)", "pytest (>=4.4.0)", "pytest-forked", "six", "filelock ; extra == 'testing'" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "pytest xdist plugin for distributed testing and loop-on-failing modes", "version": "0.0.1" }, "last_serial": 5576764, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ca31ef4cb347682039f8ea189c1a2e99", "sha256": "a2b1a769f57c7717a0cb2424dacd0ddb7b741e6d31bf2f99b25d1cf8af1f081e" }, "downloads": -1, "filename": "pytest_xdist_debug_for_graingert-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca31ef4cb347682039f8ea189c1a2e99", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 35497, "upload_time": "2019-07-24T09:18:45", "url": "https://files.pythonhosted.org/packages/d8/11/59a17dab844652eb2aacbe39a6a5b082711a119791b75032206f6c20a302/pytest_xdist_debug_for_graingert-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cda27f4930a18031f3563d63ca7bbdf5", "sha256": "acc1542d0173f541eaacb046a1978058d0fa6f37a843019be00c022f50981528" }, "downloads": -1, "filename": "pytest-xdist-debug-for-graingert-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cda27f4930a18031f3563d63ca7bbdf5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 62439, "upload_time": "2019-07-24T09:18:48", "url": "https://files.pythonhosted.org/packages/0b/43/186b079d121a6c862858a6b45fa8e03d520943f2ceb65c8432545b6273f0/pytest-xdist-debug-for-graingert-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ca31ef4cb347682039f8ea189c1a2e99", "sha256": "a2b1a769f57c7717a0cb2424dacd0ddb7b741e6d31bf2f99b25d1cf8af1f081e" }, "downloads": -1, "filename": "pytest_xdist_debug_for_graingert-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca31ef4cb347682039f8ea189c1a2e99", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 35497, "upload_time": "2019-07-24T09:18:45", "url": "https://files.pythonhosted.org/packages/d8/11/59a17dab844652eb2aacbe39a6a5b082711a119791b75032206f6c20a302/pytest_xdist_debug_for_graingert-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cda27f4930a18031f3563d63ca7bbdf5", "sha256": "acc1542d0173f541eaacb046a1978058d0fa6f37a843019be00c022f50981528" }, "downloads": -1, "filename": "pytest-xdist-debug-for-graingert-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cda27f4930a18031f3563d63ca7bbdf5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 62439, "upload_time": "2019-07-24T09:18:48", "url": "https://files.pythonhosted.org/packages/0b/43/186b079d121a6c862858a6b45fa8e03d520943f2ceb65c8432545b6273f0/pytest-xdist-debug-for-graingert-0.0.1.tar.gz" } ] }