Name | pytest-suite-timeout JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A pytest plugin for ensuring max suite time |
upload_time | 2024-01-26 21:28:59 |
maintainer | None |
docs_url | None |
author | Brian Okken |
requires_python | >=3.7 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# pytest-suite-timeout
A pytest plugin for ensuring max suite time.
Really though, it's: if the timeout expires, no new tests are started.
----
## A use case
Works great in conjunction with [pytest-repeat](https://github.com/pytest-dev/pytest-repeat).
Say your debugging a flaky test and just want to run it a bunch of times, but not longer than say 10 minutes (600 seconds).
After installing both `pytest-repeat` and `pytest-suite-timeout` you can say:
```
$ pytest test_something.py::test_func --count=1000 --suite-timeout=600
```
That will run a test 1000 times, if that's less than 600 seconds.
If it takes longer than 600 seconds, it will stop running new tests after 600 seconds.
## Installation
From PyPI:
```
$ pip install pytest-suite-timeout
```
## Usage
Specify the max suite time with `--suite-timeout`, in seconds (float).
Example of max 90 seconds:
```
$ pytest --suite-timeout=90
```
## Defaults to no timeout
If you don't pass in `--suite-timeout`, nothing happens.
## Timeout behavior
Timeout is done between tests.
If a timeout is noticed, `pytest.exit()` is called, stopping all further testing.
## Contributing
Contributions are welcome. Tests can be run with [tox](https://tox.readthedocs.io/en/latest/).
Test coverage is now 100%. Please make sure to keep it at 100%.
If you have an awesome pull request and need help with getting coverage back up, let me know.
## License
Distributed under the terms of the [MIT](http://opensource.org/licenses/MIT) license, "pytest-suite-timeout" is free and open source software
## Issues
If you encounter any problems, please [file an issue](https://github.com/okken/pytest-suite-timeout/issues) along with a detailed description.
## Changelog
See [changelog.md](https://github.com/okken/pytest-suite-timeout/blob/main/changelog.md)
Raw data
{
"_id": null,
"home_page": null,
"name": "pytest-suite-timeout",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Brian Okken",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/93/e8/6d879dcad2e9b937c3694adf1cea0df3c646d9bc16d1a5088c937685d84b/pytest_suite_timeout-0.1.0.tar.gz",
"platform": null,
"description": "# pytest-suite-timeout\n\nA pytest plugin for ensuring max suite time.\n\nReally though, it's: if the timeout expires, no new tests are started.\n\n----\n\n## A use case\n\nWorks great in conjunction with [pytest-repeat](https://github.com/pytest-dev/pytest-repeat).\n\nSay your debugging a flaky test and just want to run it a bunch of times, but not longer than say 10 minutes (600 seconds).\n\nAfter installing both `pytest-repeat` and `pytest-suite-timeout` you can say:\n\n```\n$ pytest test_something.py::test_func --count=1000 --suite-timeout=600\n```\n\nThat will run a test 1000 times, if that's less than 600 seconds.\nIf it takes longer than 600 seconds, it will stop running new tests after 600 seconds.\n\n\n## Installation\n\nFrom PyPI:\n\n```\n$ pip install pytest-suite-timeout\n```\n\n## Usage\n\n\nSpecify the max suite time with `--suite-timeout`, in seconds (float).\n\nExample of max 90 seconds:\n\n```\n$ pytest --suite-timeout=90\n```\n\n## Defaults to no timeout\n\nIf you don't pass in `--suite-timeout`, nothing happens.\n\n## Timeout behavior\n\nTimeout is done between tests. \nIf a timeout is noticed, `pytest.exit()` is called, stopping all further testing.\n\n## Contributing\n\nContributions are welcome. Tests can be run with [tox](https://tox.readthedocs.io/en/latest/).\nTest coverage is now 100%. Please make sure to keep it at 100%.\nIf you have an awesome pull request and need help with getting coverage back up, let me know.\n\n\n## License\n\nDistributed under the terms of the [MIT](http://opensource.org/licenses/MIT) license, \"pytest-suite-timeout\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please [file an issue](https://github.com/okken/pytest-suite-timeout/issues) along with a detailed description.\n\n## Changelog\n\nSee [changelog.md](https://github.com/okken/pytest-suite-timeout/blob/main/changelog.md)\n",
"bugtrack_url": null,
"license": null,
"summary": "A pytest plugin for ensuring max suite time",
"version": "0.1.0",
"project_urls": {
"Home": "https://github.com/okken/pytest-suite-timeout"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9388870b44fb8ccb2b63fd9b48b65eec557546eeb644b7d8bc860c3d77038cae",
"md5": "f8e551d14946c96a46db97e2e36c0b6e",
"sha256": "cb79bea59edbe36164cd6e09f124fda623ce2d97b71b2853c84f07ee1ba76228"
},
"downloads": -1,
"filename": "pytest_suite_timeout-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f8e551d14946c96a46db97e2e36c0b6e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3802,
"upload_time": "2024-01-26T21:28:58",
"upload_time_iso_8601": "2024-01-26T21:28:58.435938Z",
"url": "https://files.pythonhosted.org/packages/93/88/870b44fb8ccb2b63fd9b48b65eec557546eeb644b7d8bc860c3d77038cae/pytest_suite_timeout-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "93e86d879dcad2e9b937c3694adf1cea0df3c646d9bc16d1a5088c937685d84b",
"md5": "3b1033ea1905ac94ad9fe52bca3e6b4e",
"sha256": "2f536ed8906f0b159c5f20e58714180536fb9a9f786e5f6dfb148a54b0b543c4"
},
"downloads": -1,
"filename": "pytest_suite_timeout-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3b1033ea1905ac94ad9fe52bca3e6b4e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5484,
"upload_time": "2024-01-26T21:28:59",
"upload_time_iso_8601": "2024-01-26T21:28:59.563468Z",
"url": "https://files.pythonhosted.org/packages/93/e8/6d879dcad2e9b937c3694adf1cea0df3c646d9bc16d1a5088c937685d84b/pytest_suite_timeout-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-26 21:28:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "okken",
"github_project": "pytest-suite-timeout",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "pytest-suite-timeout"
}