Pre-release
This release is a pre-release and may not be stable for production use.
streamtest - unit test the output of standard stream
Overview
The streamtest provides the enhanced unittest.TestCase for testing the output of standard stream (stdout, stderr).
Usage
from stramtest import CatchStreamTestCase
class StreamTestCase(CatchStreamTestCase):
def test_stdout(self):
with self.catch_stream("stdout") as stream:
print "hello world"
self.assertEqual(stream, "hello world\n")
def test_stderr(self):
with self.catch_stream("stderr") as stream:
sys.stderr.write("Error!")
self.assertEqual(stream, "Error!")
Installation
$ pip install streamtest
or
$ git clone git@github.com:alice1017/streamtest.git $ cd streamtest $ python setup.py build install
Metadata
Release files for streamtest 1.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| streamtest-1.0b1.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streamtest-1.0b1-py2.7.egg | Legacy Egg format | - | - | Details |
Total release size: 7.5 kB
Release files / streamtest-1.0b1.tar.gz
| Download URL | streamtest-1.0b1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1d511ff1303075bfd3557a2990769abc44b2cb7ede9f7391d1a1c64fb5a93e4
|
|
BLAKE2b-256 checksum How to use checksums |
4dda461330bd5bf4503f3ecfd9f830bb87252855ce9aa4728232dd8c8c6dc8da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / streamtest-1.0b1-py2.7.egg
| Download URL | streamtest-1.0b1-py2.7.egg |
|---|---|
| Size | 5.0 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
bf9c0ce5d9bd148a831f383681e0edcdd662d818d3cc859d67c81616d8758fcf
|
|
BLAKE2b-256 checksum How to use checksums |
e17e97943a6b6588b335d5f3ddec929b2510437290011421b8331fac1920eb58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |