{"id":16214324,"url":"https://github.com/scony/pytest-timeouts","last_synced_at":"2025-09-10T23:34:45.123Z","repository":{"id":62584236,"uuid":"138624564","full_name":"Scony/pytest-timeouts","owner":"Scony","description":"Linux-only Pytest plugin to control durations of various test case execution phases","archived":false,"fork":false,"pushed_at":"2019-12-30T20:03:42.000Z","size":56,"stargazers_count":12,"open_issues_count":4,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-27T08:19:34.771Z","etag":null,"topics":["linux","pytest","pytest-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scony.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-25T16:55:44.000Z","updated_at":"2023-11-23T04:10:55.000Z","dependencies_parsed_at":"2022-11-03T21:58:04.513Z","dependency_job_id":null,"html_url":"https://github.com/Scony/pytest-timeouts","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scony%2Fpytest-timeouts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scony%2Fpytest-timeouts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scony%2Fpytest-timeouts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scony%2Fpytest-timeouts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scony","download_url":"https://codeload.github.com/Scony/pytest-timeouts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814864,"owners_count":20352037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","pytest","pytest-plugin"],"created_at":"2024-10-10T11:10:21.514Z","updated_at":"2025-03-16T11:30:53.389Z","avatar_url":"https://github.com/Scony.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytest-timeouts\n[![Build Status](https://travis-ci.org/Scony/pytest-timeouts.svg?branch=master)](https://travis-ci.org/Scony/pytest-timeouts)\n[![codecov](https://codecov.io/gh/Scony/pytest-timeouts/branch/master/graph/badge.svg)](https://codecov.io/gh/Scony/pytest-timeouts)\n[![Documentation Status](https://readthedocs.org/projects/pytest-timeouts/badge/?version=latest)](https://pytest-timeouts.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://img.shields.io/pypi/v/pytest-timeouts.svg)](https://pypi.org/project/pytest-timeouts/)\n![pyversion](https://img.shields.io/pypi/pyversions/pytest-timeouts.svg)\n![Supported pytest 3|4](https://img.shields.io/badge/pytest-3|4-blue.svg)\n[![Downloads](https://pepy.tech/badge/pytest-timeouts)](https://pepy.tech/project/pytest-timeouts)\n[![PyPI - License](https://img.shields.io/pypi/l/pytest-timeouts.svg)](https://github.com/Scony/pytest-timeouts/blob/master/LICENSE)\n![GitHub Release Date](https://img.shields.io/github/release-date/Scony/pytest-timeouts.svg)\n\nLinux-only Pytest plugin to control durations of various test case execution phases.\n\n## Documentation\n\nFor documentation visit [pytest-timeouts.readthedocs.io](https://pytest-timeouts.readthedocs.io).\n\n## About\n\nThis plugin has been designed for specific use cases which are out of the scope of famous `pytest-timeout` plugin.\nIt uses a `SIGALRM` signal to schedule a timer which breaks the test case.\n\n## Features\n\n* `setup`, `execution` and `teardown` phase timeouts controllable by:\n   * opts: `--setup-timeout`, `--execution-timeout` and `--teardown-timeout`\n   * ini: `setup_timeout`, `execution_timeout` and `teardown_timeout`\n   * mark: `setup_timeout`, `execution_timeout` and `teardown_timeout`\n* fixed order of timeout settings: **opts** \u003e **markers** \u003e **ini**, controlled by `--timeouts-order`\n* `--timeouts-order` allow change order of override timeout settings, and disable some settings, i.e. `--timeout-order i` disable markers and opts, any combination is allow\n* timeout disabled when debugging with PDB\n\n## Installation\n\n### Stable\n\n```bash\npip install pytest-timeouts\n```\n\n### Master\n\n```bash\npip install git+https://github.com/Scony/pytest-timeouts.git\n```\n\n## Usage\n\n### Command line\n\n```bash\npytest --setup-timeout 2.5 --execution-timeout 2.01  --teardown-timeout 0\n```\n\n### `pytest.ini` setting\n\n```ini\n[pytest]\nsetup_timeout = 2.5\nexecution_timeout = 2.01\nteardown_timeout = 0\n```\n\n### Mark\n\n```python\nimport time\n\nimport pytest\n\n\n@pytest.mark.setup_timeout(0.3)\n@pytest.mark.execution_timeout(0.5)\n@pytest.mark.teardown_timeout(0.4)\ndef test_timeout():\n    time.sleep(1)\n```\n\n## Contributors\n\n* Pawel Lampe\n* Kamil Luczak\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscony%2Fpytest-timeouts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscony%2Fpytest-timeouts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscony%2Fpytest-timeouts/lists"}