summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2012-12-17 11:48:58 +1300
committerRobert Collins <robertc@robertcollins.net>2012-12-17 11:48:58 +1300
commit4cbce7d3fa1fd3faec044868c9443bc24f391d67 (patch)
tree80e301e2a7392f081fd2ab626206dc5972c83e70 /README
parentb9dac139cb0d92f3f72d64aff4486defbb59510f (diff)
parent08f31e951497aa600055bf7cb5f18acf4c6e1884 (diff)
downloadfixtures-4cbce7d3fa1fd3faec044868c9443bc24f391d67.tar.gz
* ``DetailStream`` was ambiguous about whether it handled bytes or characters,
which matters a lot for Python3. It now is deprecated with ByteStream and StringStream replacing it. (Robert Collins) * Fixtures is now Python3 compatible. (Robert Collins)
Diffstat (limited to 'README')
-rw-r--r--README23
1 files changed, 18 insertions, 5 deletions
diff --git a/README b/README
index 074a5cc..69c2a69 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('sys.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
+++++++