diff options
author | Robert Collins <robertc@robertcollins.net> | 2012-12-11 14:16:29 +1300 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2012-12-11 14:16:29 +1300 |
commit | af26cb9e360976ebebadabb39769009d51b2eb7e (patch) | |
tree | f36cc5253a8cc74b9af76c07a617db0566b56fd5 | |
parent | 110ecf38efade4afc1e7273398c6ab994a1d3a64 (diff) | |
download | fixtures-af26cb9e360976ebebadabb39769009d51b2eb7e.tar.gz |
Document DetailStream.
-rw-r--r-- | README | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -266,6 +266,19 @@ In addition to the Fixture, FunctionFixture and MethodFixture classes fixtures includes a number of precanned fixtures. The API docs for fixtures will list the complete set of these, should the dcs be out of date or not to hand. +DetailStream +++++++++++++ + +Trivial adapter to make a StringIO (though it may in future auto-spill to disk +for large content) and expose that as a detail object, for automatic inclusion +in test failure descriptions. Very useful in combination with MonkeyPatch. + + >>> fixture = fixtures.DetailStream('stdout') + >>> fixture.setUp() + >>> with fixtures.MonkeyPatch('sys.stdout', fixture.stream): + ... pass + >>> fixture.cleanUp() + EnvironmentVariable +++++++++++++++++++ |