{ "info": { "author": "Tom Milligan", "author_email": "code@tommilligan.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Testing" ], "description": "# pytest-jobserver\n\n[![PyPI version](https://img.shields.io/pypi/v/pytest-jobserver.svg)](https://pypi.org/project/pytest-jobserver)\n[![Python versions](https://img.shields.io/pypi/pyversions/pytest-jobserver.svg)](https://pypi.org/project/pytest-jobserver)\n[![Code coverage](https://codecov.io/gh/tommilligan/pytest-jobserver/branch/master/graph/badge.svg)](https://codecov.io/gh/tommilligan/pytest-jobserver/branch/master)\n[![Build status](https://img.shields.io/circleci/project/github/tommilligan/pytest-jobserver/master.svg)](https://circleci.com/gh/tommilligan/pytest-jobserver)\n\nLimit parallel tests with posix jobserver.\n\n## Installation\n\nInstall with pip:\n\n```bash\npip install pytest-jobserver\n```\n\nThe plugin officially supports Python `>= 3.6` on a Linux OS.\nYou may find other Python 3 versions/MacOS work as well.\n\n## Usage\n\nThe plugin uses a [POSIX jobserver](https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html) to manage parallel test loading.\n\nPass the `--jobserver` argument with a path, where this path points to a named pipe acting as a jobserver.\nYou should probably also use `pytest-xdist` to enable parallelism in the first place:\n\n```bash\npytest -n4 --jobserver /opt/jobserver\n```\n\nYou can also pass this filepath via the `PYTEST_JOBSERVER` environment variable.\n\n### `make`\n\nThe plugin can also listen for an existing jobserver as created by `make`.\nIf a jobserver is not configured by filepath, `pytest-jobserver` will check the following environment variables in order:\n\n- `CARGO_MAKEFLAGS`\n- `MAKEFLAGS`\n- `MFLAGS`\n\n**Please note:** it is not possible to use one of these environment variables with `pytest-xdist`. The `execnet` protocol used by `xdist` does not support passing file descriptors to remote child processes.\n\n## Implementation\n\nThis plugin [wraps pytest's call to `pytest_runtest_protocol`](https://docs.pytest.org/en/latest/reference.html#_pytest.hookspec.pytest_runtest_protocol), which is called to actually run a collected item on the worker node.\n\n## Development\n\nSee the top level `Makefile` and `.circleci/config.yml` for the development flow. But in essence:\n\n- `make dev` to install deps\n- `make lint` to lint code (will change files)\n- `make test` to run lint/unit tests\n- `make integrate` to run integration tests\n\n## Changelog\n\n### 1.0.0\n\n#### Features\n\n- jobserver token `int` value can be accessed within a test using the `jobserver_token` fixture\n- bump to `1.0.0` as the plugin is now stable, and in use by other projects\n\n### 0.3.1\n\n#### Bugfixes\n\n- fix package installation with pip\n\n### 0.3.0\n\n#### Features\n\n- a jobserver filepath can also be configured by the `PYTEST_JOBSERVER` environment variable\n\n### 0.2.2\n\n#### Bugfixes\n\n- move jobserver status on startup to official `pytest_report_header` hook\n\n### 0.2.1\n\n#### Bugfixes\n\n- remove `pytest-xdist` from runtime dependencies\n\n### 0.2.0\n\n#### Features\n\n- can run against a jobserver specified with `make` environment variables\n - note that this will deliberately not work when also using `pytest-xdist`\n\n### 0.1.1\n\n#### Bugfixes\n\n- fix setup.py package metadata\n\n### 0.1.0\n\n#### Features\n\n- can run against a jobserver specified at the cli\n\n## TODO\n\n- [x] run against cli jobserver\n- [x] integrate with Make jobserver from environment variables\n- [ ] factor out creation of jobservers to seperate python package\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tommilligan/pytest-jobserver", "keywords": "pytest jobserver posix make cargo limit cap parallel limit", "license": "Apache Software License 2.0", "maintainer": "Tom Milligan", "maintainer_email": "code@tommilligan.net", "name": "pytest-jobserver", "package_url": "https://pypi.org/project/pytest-jobserver/", "platform": "", "project_url": "https://pypi.org/project/pytest-jobserver/", "project_urls": { "Homepage": "https://github.com/tommilligan/pytest-jobserver" }, "release_url": "https://pypi.org/project/pytest-jobserver/1.0.0/", "requires_dist": [ "pytest" ], "requires_python": ">=3.4", "summary": "Limit parallel tests with posix jobserver.", "version": "1.0.0" }, "last_serial": 5273505, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e2472eb69c8f7b1a4edeedaac560012b", "sha256": "783e6ed82a20da480d8585eccab687d7b2992fd5921f172811681f657d15fcf2" }, "downloads": -1, "filename": "pytest_jobserver-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e2472eb69c8f7b1a4edeedaac560012b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 6062, "upload_time": "2019-04-28T22:07:39", "url": "https://files.pythonhosted.org/packages/d9/e0/fab1afe1bf09f3dd37de40ccbc7367ce180493dc84ff346c24012b3e8f6e/pytest_jobserver-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6df22b2dd82306aa5dff4f1a433f66f8", "sha256": "6f6f0ea5683f73671ee413eba64b978c5843be881732ed566df6b37d4e643c48" }, "downloads": -1, "filename": "pytest-jobserver-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6df22b2dd82306aa5dff4f1a433f66f8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 5883, "upload_time": "2019-04-28T22:07:50", "url": "https://files.pythonhosted.org/packages/4e/07/442150f9a0d5aef18c5271db384d6968002e698542c8a3d4bc40eb4e9ba5/pytest-jobserver-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1a0d7523cde555785d9ebf0310e7606a", "sha256": "f3dda3a4974fc9f9afe5d6542270241fd8a79db0fd05ecca528c0b42c84d6f26" }, "downloads": -1, "filename": "pytest_jobserver-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1a0d7523cde555785d9ebf0310e7606a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 6517, "upload_time": "2019-04-29T09:35:09", "url": "https://files.pythonhosted.org/packages/98/60/ed882e4c3bf92446bf451aae1204ec70b3968a787fd0c0db5cf4ac290456/pytest_jobserver-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7719805a06c1f1a034ab144a7d11519e", "sha256": "68a372815a67b3924059b2788c43b8f34c374d878bbbd60721da2e7680c4e1db" }, "downloads": -1, "filename": "pytest-jobserver-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7719805a06c1f1a034ab144a7d11519e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6451, "upload_time": "2019-04-29T09:35:14", "url": "https://files.pythonhosted.org/packages/d5/cd/c386e08c5b5c01113585a0e2f3c6d54c2f808c6282f67bb6ba09983f1908/pytest-jobserver-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "64677a5ea065b45472a5b3447a01deb7", "sha256": "e454c557ecef6018c5a75f82d6f7910f6ad814a192d06ce79c66f41f6f2abccc" }, "downloads": -1, "filename": "pytest_jobserver-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "64677a5ea065b45472a5b3447a01deb7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 6909, "upload_time": "2019-05-01T13:17:30", "url": "https://files.pythonhosted.org/packages/90/c0/848e86fdd9cf913c30cc215ef3ab7a3d50bc5f2a4b0e40b48a8701ad67a5/pytest_jobserver-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1fce6ada94ca644eaf94af493e22444b", "sha256": "8d66abdee8c7fb28e7eb0d59467d0228769d4697171c554f0867b590a877e568" }, "downloads": -1, "filename": "pytest-jobserver-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1fce6ada94ca644eaf94af493e22444b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6907, "upload_time": "2019-05-01T13:17:31", "url": "https://files.pythonhosted.org/packages/26/9c/a965b075e5df57b202ee30fb0753f5b063a37dd8ad201f85b2f23f31c72d/pytest-jobserver-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "bcce043cd43cf643df726da4d20ed9da", "sha256": "48354775b8e518377b7b9c492e647a9df88fe4a0016affb32a1b7485ce6d357a" }, "downloads": -1, "filename": "pytest_jobserver-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bcce043cd43cf643df726da4d20ed9da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 6925, "upload_time": "2019-05-01T16:14:31", "url": "https://files.pythonhosted.org/packages/fe/a5/f4877fb915a40faeb8d9f49af8ea102a899486aa12b05caf466d33010b74/pytest_jobserver-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec0f0e829d1bcde89b0b9d027214c651", "sha256": "c207cd3735daaf5fd7689b82b45e62407468f5012717d06562b0c15aecd56c8b" }, "downloads": -1, "filename": "pytest-jobserver-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ec0f0e829d1bcde89b0b9d027214c651", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6934, "upload_time": "2019-05-01T16:14:32", "url": "https://files.pythonhosted.org/packages/32/0e/500a4a7dcf3cc8b30bf933fa549b6ac9801d22ac25dd34876bab745a87d4/pytest-jobserver-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "0683245974d260de782847eae1e65a6d", "sha256": "f78fadc62d77adefe77f79d682258e0dbf130ddd83fce24959edd00915512d8e" }, "downloads": -1, "filename": "pytest_jobserver-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0683245974d260de782847eae1e65a6d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 6999, "upload_time": "2019-05-01T17:22:28", "url": "https://files.pythonhosted.org/packages/eb/f0/c38586650b1062d820a39ee1c70ea0682d858c9661b4d2a5f491e8bd8b7b/pytest_jobserver-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06a8c4e4eec3c1d946c8b4ed51418119", "sha256": "08d78f07a8f91e27401fbf109f50497260026765356e2ecbcce2b003fbc92c08" }, "downloads": -1, "filename": "pytest-jobserver-0.2.2.tar.gz", "has_sig": false, "md5_digest": "06a8c4e4eec3c1d946c8b4ed51418119", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 7014, "upload_time": "2019-05-01T17:22:29", "url": "https://files.pythonhosted.org/packages/f5/58/938f7e86bbba43899de7b943e8ebe013086bf54f436938759e0301980ad1/pytest-jobserver-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "3d37f155a7569012fdb6847756ccacc8", "sha256": "3776c55010e42ae7d0ed72dbe0cd4d50fc1064e0e6b2d00455ecacae1b269b9d" }, "downloads": -1, "filename": "pytest_jobserver-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3d37f155a7569012fdb6847756ccacc8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 7062, "upload_time": "2019-05-02T13:15:12", "url": "https://files.pythonhosted.org/packages/39/b7/984857b83c93ca614c474dc36be02231b22cab2c2d49d77e3aad8787e931/pytest_jobserver-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "28e277c3700ccfd0ca7e4539d6692140", "sha256": "b8e007f420bd1eb7874265233b290062c245453fe55f5681c4efdef74eb5ecc3" }, "downloads": -1, "filename": "pytest-jobserver-0.3.0.tar.gz", "has_sig": false, "md5_digest": "28e277c3700ccfd0ca7e4539d6692140", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 7090, "upload_time": "2019-05-02T13:15:13", "url": "https://files.pythonhosted.org/packages/0b/49/0f9e938904a5570ab0d7dd6eb0467c16d30829ec3012c3c0c8a2f1016ef2/pytest-jobserver-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "21caaefa67876f56a4232b00e773ef64", "sha256": "52ae7873cbd67dd7a67513039414ccaa5f354e38cb9a86d1d840dc82c199a442" }, "downloads": -1, "filename": "pytest_jobserver-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "21caaefa67876f56a4232b00e773ef64", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 12209, "upload_time": "2019-05-03T08:49:50", "url": "https://files.pythonhosted.org/packages/42/7e/68b07f7ec616b02b526ba2ae160eb0fd1f9a104799bdb3edca4e6cb8ece6/pytest_jobserver-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ddfe080af075a1358885215a95bc5dc", "sha256": "f6b226f8e9b1a6ad42c25b1a439fcfca2bc086ebb7aa0fe09d14ab5867b98138" }, "downloads": -1, "filename": "pytest-jobserver-0.3.1.tar.gz", "has_sig": false, "md5_digest": "1ddfe080af075a1358885215a95bc5dc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6074, "upload_time": "2019-05-03T08:49:51", "url": "https://files.pythonhosted.org/packages/70/e4/e2f8fc678a6bc41d33f161f52f56281d36c74b9ee878d7e620b5b3105034/pytest-jobserver-0.3.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "e1f64b74ab8d0dcb1a9b3ef6e656d2f2", "sha256": "fb092facc19a6b999038fba1256ab130b55680f1096c4a206eee8211de2c1e63" }, "downloads": -1, "filename": "pytest_jobserver-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e1f64b74ab8d0dcb1a9b3ef6e656d2f2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 12441, "upload_time": "2019-05-15T17:16:15", "url": "https://files.pythonhosted.org/packages/1d/09/ba57330fc0961f272e9a6090609f450ca9ac513ffbab199ac9e30326d010/pytest_jobserver-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c8f74eeda5a671aaba5d25a480d396f", "sha256": "00461f0efc20941888637232558e930d1606701b4391dd659bfe91f066eae796" }, "downloads": -1, "filename": "pytest-jobserver-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4c8f74eeda5a671aaba5d25a480d396f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6286, "upload_time": "2019-05-15T17:16:17", "url": "https://files.pythonhosted.org/packages/73/94/f2f7db7c9ea5fe31f1fb1d78b1013ab50446a83fe722a1a60cc52a158c3d/pytest-jobserver-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e1f64b74ab8d0dcb1a9b3ef6e656d2f2", "sha256": "fb092facc19a6b999038fba1256ab130b55680f1096c4a206eee8211de2c1e63" }, "downloads": -1, "filename": "pytest_jobserver-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e1f64b74ab8d0dcb1a9b3ef6e656d2f2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 12441, "upload_time": "2019-05-15T17:16:15", "url": "https://files.pythonhosted.org/packages/1d/09/ba57330fc0961f272e9a6090609f450ca9ac513ffbab199ac9e30326d010/pytest_jobserver-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c8f74eeda5a671aaba5d25a480d396f", "sha256": "00461f0efc20941888637232558e930d1606701b4391dd659bfe91f066eae796" }, "downloads": -1, "filename": "pytest-jobserver-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4c8f74eeda5a671aaba5d25a480d396f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6286, "upload_time": "2019-05-15T17:16:17", "url": "https://files.pythonhosted.org/packages/73/94/f2f7db7c9ea5fe31f1fb1d78b1013ab50446a83fe722a1a60cc52a158c3d/pytest-jobserver-1.0.0.tar.gz" } ] }