waitforit
| What | Badges |
|---|---|
| Code and Test Quality | |
| SonarQube | |
| PyPI |
This is a library for letting your python code wait for a certain action to complete
short example
Given these functions
import wait_for_it_to
def foo():
return True
def bar(param):
x = param
return False
This would immediatly return
>> wait_for_it_to.be_true(foo)
>>
You can also pass parameters as a list
>> wait_for_it_to.be_true(bar, args=[1])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "..\wait_for_it\wait_for_it_to\__init__.py", line 27, in be_true
raise TimeoutError(msg)
TimeoutError: expected something that evaluates to True, but got False instead
You can also pass a timeout value in seconds
>> wait_for_it_to.be_true(foo, timeout=5)
Quite similar you have the functionality
>> wait_for_it_to.be_false(bar, timeout=5, args[1])
>> wait_for_it_to.equal(bar, False, timeout=5, args[1])
>> wait_for_it_to.not_raise_an_exception(bar, timeout=5, RuntimeError)
Version History
Metadata
Release files for wait-for-it-to 0.0.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wait_for_it_to-0.0.21.tar.gz | 26.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wait_for_it_to-0.0.21-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.7 kB
Release files / wait_for_it_to-0.0.21.tar.gz
| Download URL | wait_for_it_to-0.0.21.tar.gz |
|---|---|
| Size | 26.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2449c665da0df0a136f6a875dff110cf5feac3cdac51c69a930fe217eec921b3
|
|
BLAKE2b-256 checksum How to use checksums |
3ced3821371cc1941a4e626e3deebca76b3c62aeb959bb0c4c1f0b560901a0e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / wait_for_it_to-0.0.21-py3-none-any.whl
| Download URL | wait_for_it_to-0.0.21-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4455985af1743b6fa3649bb9119a9e53bb4972160d629bbbdca529db883be747
|
|
BLAKE2b-256 checksum How to use checksums |
fcede151673d53c420a2a15e974ce3c80f06a6637a3ef505689f1b09419eb7be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|