We'll write another test (you can add it to
test.txt if you like) which shows off most of the details of doctest syntax.
test.txt), separated from the existing tests by at least one blank line:
Now we're going to take some more of doctest's syntax for a spin. >>> import sys >>> def test_write(): ... sys.stdout.write("Hello\n") ... return True >>> test_write() Hello True
Think about it for a moment: What does this do? Do you expect the test to pass, or to fail?