Skip to main content

A helper for testing process output

Project description

A helper for testing output of a process in tests.

Installing

$ pip install what

Usage

>>> from what import What
>>> w = What('echo', 'hello world')
>>> w.expect('hello')
'hello world'
>>> w.expect('unicorns', timeout=1)
>>> # ... tracback here ...
what.exceptions.EOF: End of file is reached while expecting string
Expected: unicorns
Return code: 0
Timed out: False
Last 100 lines:
======================================================================
hello world
>>> w.expect_exit(0)

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

What-0.4.1.tar.gz (3.1 kB view hashes)

Uploaded Source

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