A helper for testing process output
Project description
A helper for testing output of a process in tests.
Installing
$ pip install kuyruk
Usage
>>> from what import What
>>> w = What('echo', 'hello world')
>>> w.expect('hello')
'hello world'
>>> w.expect('unicorns', timeout=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/cenk/projects/what/what/__init__.py", line 46, in expect
raise WhatError(self, string)
what.WhatError:
Expected: 'unicorns'
Found: None
Last 100 lines:
======================================================================
hello world
>>> w.expect_exit(0)
Project details
Release history Release notifications | RSS feed
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.3.0.tar.gz
(2.5 kB
view hashes)