Skip to main content
import operator
from retry_pytest.retry import Retry

with Retry() as r:
    r.check(operator.sub, 4, 2).equal(2)
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)
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')
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)
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')
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)
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')
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)

Metadata

Release files for retry-pytest 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for retry-pytest 1.3.0
File Size Uploaded
retry_pytest-1.3.0.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for retry-pytest 1.3.0
File Interpreter ABI Platform
retry_pytest-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.7 kB

Release files / retry_pytest-1.3.0.tar.gz

Download URL retry_pytest-1.3.0.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
48af71579977874b185fc7ef1c939a57a26365c597554e74da230584c4deb719
BLAKE2b-256 checksum
How to use checksums
7f9f69ac1f63fa612eae5bcd173a1e001de376c90c3ec35c98c1f5bc18b09c9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / retry_pytest-1.3.0-py3-none-any.whl

Download URL retry_pytest-1.3.0-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93500c88ee203560a869f255e917e27c58f363b871692c8eca5c5c3829e9ca65
BLAKE2b-256 checksum
How to use checksums
11648b66dd6130f21737f9d8106401ce6d60363116e1143d0fa0422d083485c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page