Name | retry-pytest JSON |
Version |
1.2.0
JSON |
| download |
home_page | None |
Summary | retry_pytest |
upload_time | 2024-08-19 10:05:23 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | GNU AGPL |
keywords |
pytest
allure
retry
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
```python
import operator
from retry_pytest.retry import Retry
with Retry() as r:
r.check(operator.sub, 4, 2).equal(2)
```
```python
import operator
from retry_pytest.retry import Retry
with Retry(ZeroDivisionError, title='custom allure step title for skip ZeroDivisionError', timeout=10, poll_frequency=2) as r:
r.check(operator.truediv, 4, 0).equal(2)
```
```python
import operator
from retry_pytest.retry import Retry
with Retry() as r:
r.check(operator.sub, 4, 2).equal(1)
r.on_timeout(print, 'wtf')
```
```python
import operator
from retry_pytest.retry import Retry
with Retry() as r:
r.check(operator.sub, 4, 2).equal(2)
r.check(operator.add, 2, 2).equal(4)
```
```python
from retry_pytest.retry import Retry
def get_result_as_list_of_dicts():
return [{'key1': 'data1', 'key2': 'data2'}]
with Retry() as r:
r.check(get_result_as_list_of_dicts).get(0).get('key1').equal('data1')
```
```python
from retry_pytest.retry import Retry
def get_result_as_list():
return [1,2,3]
with Retry() as r:
r.check(get_result_as_list).get(0).equal(1)
```
```python
from retry_pytest.retry import Retry
def get_result_as_dict():
return {'key1': 'data1', 'key2': 'data2'}
with Retry() as r:
r.check(get_result_as_dict).get('key1').equal('data1')
```
```python
from retry_pytest.retry import Retry
def get_result_as_list_of_dicts():
return [{'key1': 'data1', 'key2': 'data2'}]
with Retry() as r:
r.check(get_result_as_list_of_dicts).get(0).get('key1').equal('data1')
r.check(get_result_as_list_of_dicts).get(0).get('key2').equal('data2')
print(r.commands[-2].result)
print(r.last_command.result)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "retry-pytest",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "pytest, allure, retry",
"author": null,
"author_email": "Alexander Evdokimov <1812gg@bk.ru>",
"download_url": "https://files.pythonhosted.org/packages/86/46/e4d6b3baf684ae0598bead87b4d2239e4b9f1e6f2224d77e0ca93a77e3af/retry_pytest-1.2.0.tar.gz",
"platform": null,
"description": "```python\r\nimport operator\r\nfrom retry_pytest.retry import Retry\r\n\r\nwith Retry() as r:\r\n r.check(operator.sub, 4, 2).equal(2)\r\n```\r\n\r\n```python\r\nimport operator\r\nfrom retry_pytest.retry import Retry\r\n\r\nwith Retry(ZeroDivisionError, title='custom allure step title for skip ZeroDivisionError', timeout=10, poll_frequency=2) as r:\r\n r.check(operator.truediv, 4, 0).equal(2)\r\n```\r\n\r\n```python\r\nimport operator\r\nfrom retry_pytest.retry import Retry\r\n\r\nwith Retry() as r:\r\n r.check(operator.sub, 4, 2).equal(1)\r\n r.on_timeout(print, 'wtf')\r\n```\r\n\r\n```python\r\nimport operator\r\nfrom retry_pytest.retry import Retry\r\n\r\nwith Retry() as r:\r\n r.check(operator.sub, 4, 2).equal(2)\r\n r.check(operator.add, 2, 2).equal(4)\r\n```\r\n\r\n```python\r\nfrom retry_pytest.retry import Retry\r\n\r\ndef get_result_as_list_of_dicts():\r\n return [{'key1': 'data1', 'key2': 'data2'}]\r\n \r\nwith Retry() as r:\r\n r.check(get_result_as_list_of_dicts).get(0).get('key1').equal('data1')\r\n```\r\n\r\n```python\r\nfrom retry_pytest.retry import Retry\r\n\r\ndef get_result_as_list():\r\n return [1,2,3]\r\n \r\nwith Retry() as r:\r\n r.check(get_result_as_list).get(0).equal(1)\r\n```\r\n\r\n```python\r\nfrom retry_pytest.retry import Retry\r\n\r\ndef get_result_as_dict():\r\n return {'key1': 'data1', 'key2': 'data2'}\r\n \r\nwith Retry() as r:\r\n r.check(get_result_as_dict).get('key1').equal('data1')\r\n```\r\n\r\n```python\r\nfrom retry_pytest.retry import Retry\r\n\r\ndef get_result_as_list_of_dicts():\r\n return [{'key1': 'data1', 'key2': 'data2'}]\r\n \r\nwith Retry() as r:\r\n r.check(get_result_as_list_of_dicts).get(0).get('key1').equal('data1')\r\n r.check(get_result_as_list_of_dicts).get(0).get('key2').equal('data2')\r\n \r\nprint(r.commands[-2].result)\r\nprint(r.last_command.result)\r\n```\r\n",
"bugtrack_url": null,
"license": "GNU AGPL",
"summary": "retry_pytest",
"version": "1.2.0",
"project_urls": {
"Homepage": "https://github.com/Shumodan/retry-pytest"
},
"split_keywords": [
"pytest",
" allure",
" retry"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a11510e575f7b388d389e06195d1b13faa8ff028609bbc306db407debafd6677",
"md5": "b584d97b48e9d14d132e29119da1ab62",
"sha256": "7c984ed9f2a89c437b8f5a39700964968af551e4d40efa2161578eed3466249a"
},
"downloads": -1,
"filename": "retry_pytest-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b584d97b48e9d14d132e29119da1ab62",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 17856,
"upload_time": "2024-08-19T10:05:21",
"upload_time_iso_8601": "2024-08-19T10:05:21.265818Z",
"url": "https://files.pythonhosted.org/packages/a1/15/10e575f7b388d389e06195d1b13faa8ff028609bbc306db407debafd6677/retry_pytest-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8646e4d6b3baf684ae0598bead87b4d2239e4b9f1e6f2224d77e0ca93a77e3af",
"md5": "5fa4a8919c6ea696c48b55c8011e13b5",
"sha256": "1ea49dc7847a62a7594205f5872e2549834623b7b019129defad1ff864fe9278"
},
"downloads": -1,
"filename": "retry_pytest-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "5fa4a8919c6ea696c48b55c8011e13b5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 15736,
"upload_time": "2024-08-19T10:05:23",
"upload_time_iso_8601": "2024-08-19T10:05:23.159974Z",
"url": "https://files.pythonhosted.org/packages/86/46/e4d6b3baf684ae0598bead87b4d2239e4b9f1e6f2224d77e0ca93a77e3af/retry_pytest-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-19 10:05:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Shumodan",
"github_project": "retry-pytest",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "retry-pytest"
}