Fix doctest format for socket.setdefaulttimeout call.
authorW. Trevor King <wking@drexel.edu>
Sat, 18 Feb 2012 20:48:33 +0000 (15:48 -0500)
committerW. Trevor King <wking@drexel.edu>
Sat, 18 Feb 2012 20:48:33 +0000 (15:48 -0500)
Also clear the class-wide resolver cache before the Resolver doctests.

apachelog/resolve.py

index 9d8b66c61830911d2dd8810acfdae672dbd328cb..d825c17e285cdfa3b2d721cd0946911ea8917b51 100644 (file)
@@ -12,9 +12,10 @@ class Resolver (object):
 
     >>> import socket
     >>> if hasattr(_socket, 'setdefaulttimeout'):
-    >>>     socket.setdefaulttimeout(5)  # set 5 second timeout
+    ...     socket.setdefaulttimeout(5)  # set 5 second timeout
 
     >>> r = Resolver()
+    >>> r.IP = {}  # clear cache of date from previous tests
     >>> r.resolve('198.41.0.4')
     'a.root-servers.net'
     >>> r.IP