wait-for-it-to 0.0.21

Last updated:

0 purchases

wait-for-it-to 0.0.21 Image
wait-for-it-to 0.0.21 Images
Add to Cart

Description:

waitforitto 0.0.21

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
https://github.com/studioj/wait_for_it/releases

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.