Enable doctest running for several other documents.
We have now over 640 doctests that are run with "make doctest".
diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst
index c6bc82b..0d83d77 100644
--- a/Doc/library/urlparse.rst
+++ b/Doc/library/urlparse.rst
@@ -38,12 +38,13 @@
smaller parts (for example, the network location is a single string), and %
escapes are not expanded. The delimiters as shown above are not part of the
result, except for a leading slash in the *path* component, which is retained if
- present. For example::
+ present. For example:
>>> from urlparse import urlparse
>>> o = urlparse('http://www.cwi.nl:80/%7Eguido/Python.html')
- >>> o
- ('http', 'www.cwi.nl:80', '/%7Eguido/Python.html', '', '', '')
+ >>> o # doctest: +NORMALIZE_WHITESPACE
+ ParseResult(scheme='http', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html',
+ params='', query='', fragment='')
>>> o.scheme
'http'
>>> o.port
@@ -164,7 +165,7 @@
Construct a full ("absolute") URL by combining a "base URL" (*base*) with
another URL (*url*). Informally, this uses components of the base URL, in
particular the addressing scheme, the network location and (part of) the path,
- to provide missing components in the relative URL. For example::
+ to provide missing components in the relative URL. For example:
>>> from urlparse import urljoin
>>> urljoin('http://www.cwi.nl/%7Eguido/Python.html', 'FAQ.html')
@@ -178,7 +179,7 @@
If *url* is an absolute URL (that is, starting with ``//`` or ``scheme://``),
the *url*'s host name and/or scheme will be present in the result. For example:
- ::
+ .. doctest::
>>> urljoin('http://www.cwi.nl/%7Eguido/Python.html',
... '//www.python.org/%7Eguido')
@@ -229,7 +230,7 @@
and fragment identifiers will be removed.
The result of this method is a fixpoint if passed back through the original
- parsing function::
+ parsing function:
>>> import urlparse
>>> url = 'HTTP://www.Python.org/doc/#'