]> granicus.if.org Git - python/commitdiff
Issue #14554: correct example for captured_stdout()
authorSandro Tosi <sandro.tosi@gmail.com>
Tue, 24 Apr 2012 16:38:59 +0000 (18:38 +0200)
committerSandro Tosi <sandro.tosi@gmail.com>
Tue, 24 Apr 2012 16:38:59 +0000 (18:38 +0200)
Doc/library/test.rst

index 3e1e492cf3cd446efd6deb96fc0366f09cbb7fed..434ef5ad0946c135e59c4db03488b501fad737de 100644 (file)
@@ -380,7 +380,7 @@ The :mod:`test.test_support` module defines the following functions:
 
       with captured_stdout() as s:
           print "hello"
-      assert s.getvalue() == "hello"
+      assert s.getvalue() == "hello\n"
 
    .. versionadded:: 2.6