summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2012-12-17 01:23:31 +1300
committerRobert Collins <robertc@robertcollins.net>2012-12-17 01:23:31 +1300
commit08f31e951497aa600055bf7cb5f18acf4c6e1884 (patch)
tree19a1724dd9889180673feab656b910cde2ecb151
parent523984ba06fe988e36e7acd700043bbcc4cf8da6 (diff)
downloadfixtures-08f31e951497aa600055bf7cb5f18acf4c6e1884.tar.gz
Update docs.
-rw-r--r--README23
1 files changed, 18 insertions, 5 deletions
diff --git a/README b/README
index 074a5cc..d29204a 100644
--- a/README
+++ b/README
@@ -266,16 +266,16 @@ 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
-++++++++++++
+ByteStream
+++++++++++
-Trivial adapter to make a StringIO (though it may in future auto-spill to disk
+Trivial adapter to make a BytesIO (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 = fixtures.StringStream('my-content')
>>> fixture.setUp()
- >>> with fixtures.MonkeyPatch('sys.stdout', fixture.stream):
+ >>> with fixtures.MonkeyPatch('something', fixture.stream):
... pass
>>> fixture.cleanUp()
@@ -349,6 +349,19 @@ nothing happens, if it isn't then it is added on setUp and removed on cleanUp.
>>> fixture = fixtures.PythonPathEntry('/foo/bar')
+StringStream
+++++++++++++
+
+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.StringStream('stdout')
+ >>> fixture.setUp()
+ >>> with fixtures.MonkeyPatch('sys.stdout', fixture.stream):
+ ... pass
+ >>> fixture.cleanUp()
+
TempDir
+++++++