~ubuntu-branches/ubuntu/trusty/python3.4/trusty-proposed

« back to all changes in this revision

Viewing changes to Lib/test/test_doctest.txt

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-11-25 09:44:27 UTC
  • Revision ID: package-import@ubuntu.com-20131125094427-lzxj8ap5w01lmo7f
Tags: upstream-3.4~b1
ImportĀ upstreamĀ versionĀ 3.4~b1

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