[Python-checkins] cpython: update doctests
andrew.svetlov
python-checkins at python.org
Sun Aug 12 14:16:54 CEST 2012
http://hg.python.org/cpython/rev/90a559ce9151
changeset: 78525:90a559ce9151
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Sun Aug 12 15:16:42 2012 +0300
summary:
update doctests
files:
Doc/library/email.parser.rst | 2 +-
Doc/library/functions.rst | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst
--- a/Doc/library/email.parser.rst
+++ b/Doc/library/email.parser.rst
@@ -251,7 +251,7 @@
Here's an example of how you might use this at an interactive Python prompt::
>>> import email
- >>> msg = email.message_from_string(myString)
+ >>> msg = email.message_from_string(myString) # doctest: +SKIP
Additional notes
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -305,17 +305,18 @@
>>> import struct
>>> dir() # show the names in the module namespace
- ['__builtins__', '__doc__', '__name__', 'struct']
- >>> dir(struct) # show the names in the struct module
- ['Struct', '__builtins__', '__doc__', '__file__', '__name__',
- '__package__', '_clearcache', 'calcsize', 'error', 'pack', 'pack_into',
+ ['__builtins__', '__name__', 'struct']
+ >>> dir(struct) # show the names in the struct module # doctest: +SKIP
+ ['Struct', '__all__', '__builtins__', '__cached__', '__doc__', '__file__',
+ '__initializing__', '__loader__', '__name__', '__package__',
+ '_clearcache', 'calcsize', 'error', 'pack', 'pack_into',
'unpack', 'unpack_from']
>>> class Shape(object):
- def __dir__(self):
- return ['area', 'perimeter', 'location']
+ ... def __dir__(self):
+ ... return ['area', 'perimeter', 'location']
>>> s = Shape()
>>> dir(s)
- ['area', 'perimeter', 'location']
+ ['area', 'location', 'perimeter']
.. note::
@@ -614,9 +615,9 @@
to a string (stripping a trailing newline), and returns that. When EOF is
read, :exc:`EOFError` is raised. Example::
- >>> s = input('--> ')
+ >>> s = input('--> ') # doctest: +SKIP
--> Monty Python's Flying Circus
- >>> s
+ >>> s # doctest: +SKIP
"Monty Python's Flying Circus"
If the :mod:`readline` module was loaded, then :func:`input` will use it
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list