symbian-qemu-0.9.1-12/python-2.6.1/Lib/test/test_doctest.txt
author William Roberts <williamr@symbian.org>
Tue, 04 Aug 2009 11:50:27 +0100
changeset 3 c2946f91d81f
parent 1 2fb8b9db1c86
permissions -rw-r--r--
Automated conversion of relative paths to new source layout

This is a sample doctest in a text file.

In this example, we'll rely on a global variable being set for us
already:

  >>> favorite_color
  'blue'

We can make this fail by disabling the blank-line feature.

  >>> if 1:
  ...    print 'a'
  ...    print
  ...    print 'b'
  a
  <BLANKLINE>
  b