~ubuntu-branches/ubuntu/karmic/pypy/karmic

« back to all changes in this revision

Viewing changes to py/compat/testing/test_doctest.txt

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2007-04-13 09:33:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070413093309-yoojh4jcoocu2krz
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This is a sample doctest in a text file.
 
2
 
 
3
In this example, we'll rely on a global variable being set for us
 
4
already:
 
5
 
 
6
  >>> favorite_color
 
7
  'blue'
 
8
 
 
9
We can make this fail by disabling the blank-line feature.
 
10
 
 
11
  >>> if 1:
 
12
  ...    print 'a'
 
13
  ...    print
 
14
  ...    print 'b'
 
15
  a
 
16
  <BLANKLINE>
 
17
  b