Skip to main content

Easy and expressive busy-waiting for Python

Project description

Easy and expressive busy-waiting for Python

Although you wouldn't want to do much busy waiting in your production code, testing is a different matter. When testing asynchronous systems, it's very helpful to wait for some scenario to finish its course. busypie helps you perform busy waiting easily and expressively.

Quickstart

Most typical usage will be in test, when we have a scenario that require us to wait for something to happen.

from busypie import wait, SECOND

def test_create_user():
    create_user_from(USER_DETAILS)
    wait().at_most(2, SECOND).until(lambda: is_user_exists(USER_DETAILS))

Documentation

Links

This project drew a lot of inspiration from Awaitility.

Project details


Download files

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

Source Distribution

busypie-0.5.1.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

busypie-0.5.1-py3-none-any.whl (12.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page