From a85b8535eb5348566213cba67f5c67965ad001f3 Mon Sep 17 00:00:00 2001 From: Ben Finney Date: Fri, 29 Jan 2016 18:34:15 +1100 Subject: [PATCH] Refine the tutorial text for faking file content. --- doc/tutorial.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/tutorial.txt b/doc/tutorial.txt index 46c3288..5d69bbf 100644 --- a/doc/tutorial.txt +++ b/doc/tutorial.txt @@ -28,8 +28,11 @@ Normally of course you use the full test runner, such as Python's Faking file sizes ================= -Sometimes you will need to test a program whose behaviour should -differ depending on the content of an input file. +Fake content with `io.BytesIO` +------------------------------ + +Sometimes you will need to test a program which responds differently +depending on some file's content:: >>> class BatchingReader: ... """ A reader which batches its input. """ -- 2.11.4.GIT