Commit 3ea1ea65 authored by Denis Bilenko's avatar Denis Bilenko

test__socket_dns.py: print debug stuff if -v is present

parent c6fb7d6f
......@@ -49,13 +49,16 @@ class TestCase(greentest.TestCase):
def _test_getaddrinfo(self, hostname):
for port in self.PORTS:
for args in self.getaddrinfo_args:
if VERBOSE:
print 'real_socket.getaddrinfo(%r, %r, %r)' % (hostname, port, args)
try:
real_ip = real_socket.getaddrinfo(hostname, port, *args)
except Exception, ex:
real_ip = ex
if VERBOSE:
print 'gevent.socket.getaddrinfo(%r, %r, %r)' % (hostname, port, args)
try:
ip = getaddrinfo(hostname, port, *args)
except Exception, ex:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment