Skip to main content

helper library which waits

Project description


What Badges
Travis Build Build Status
Code and Test Quality codecov Codacy Badge CodeFactor
SonarQube Quality Gate Status Code Smells Bugs Vulnerabilities
PyPI PyPI - Downloads

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\", 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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wait-for-it-to, version 0.0.20
Filename, size File type Python version Upload date Hashes
Filename, size wait_for_it_to-0.0.20-py3-none-any.whl (15.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size wait_for_it_to-0.0.20.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page