From: W. Trevor King Date: Sat, 18 Feb 2012 20:48:33 +0000 (-0500) Subject: Fix doctest format for socket.setdefaulttimeout call. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6af1b12a83b17dde3ce2315d704ca02ab0d51ea7;p=apachelog.git Fix doctest format for socket.setdefaulttimeout call. Also clear the class-wide resolver cache before the Resolver doctests. --- diff --git a/apachelog/resolve.py b/apachelog/resolve.py index 9d8b66c..d825c17 100644 --- a/apachelog/resolve.py +++ b/apachelog/resolve.py @@ -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