summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2012-12-11 14:16:29 +1300
committerRobert Collins <robertc@robertcollins.net>2012-12-11 14:16:29 +1300
commitaf26cb9e360976ebebadabb39769009d51b2eb7e (patch)
treef36cc5253a8cc74b9af76c07a617db0566b56fd5
parent110ecf38efade4afc1e7273398c6ab994a1d3a64 (diff)
downloadfixtures-af26cb9e360976ebebadabb39769009d51b2eb7e.tar.gz
Document DetailStream.
-rw-r--r--README13
1 files changed, 13 insertions, 0 deletions
diff --git a/README b/README
index 916e583..074a5cc 100644
--- a/README
+++ b/README
@@ -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
+++++++++++++++++++