[pypy-commit] pypy issue1430: clean up test
mattip
noreply at buildbot.pypy.org
Thu May 1 18:39:38 CEST 2014
Author: mattip <matti.picus at gmail.com>
Branch: issue1430
Changeset: r71139:91e137303927
Date: 2014-05-01 19:39 +0300
http://bitbucket.org/pypy/pypy/changeset/91e137303927/
Log: clean up test
diff --git a/rpython/rlib/test/test_rsocket.py b/rpython/rlib/test/test_rsocket.py
--- a/rpython/rlib/test/test_rsocket.py
+++ b/rpython/rlib/test/test_rsocket.py
@@ -67,27 +67,21 @@
domain = 'google.com'
result = [0] * nthreads
threads = [None] * nthreads
- print 'starting', 70
def lookup_name(i):
name, aliases, address_list = gethostbyname_ex(domain)
if name == domain:
result[i] += 1
- print 'done',i,75
for i in range(nthreads):
threads[i] = threading.Thread(target = lookup_name, args=[i])
threads[i].start()
- print 'threads', 78
- print 'done', 79
for i in range(nthreads):
threads[i].join()
assert sum(result) == nthreads
- print 'done', 82
def test_thread_safe_gethostbyaddr():
import threading
nthreads = 10
ip = '8.8.8.8'
- print 'starting', 87
domain = gethostbyaddr(ip)[0]
result = [0] * nthreads
threads = [None] * nthreads
@@ -98,7 +92,6 @@
for i in range(nthreads):
threads[i] = threading.Thread(target = lookup_addr, args=[ip, i])
threads[i].start()
- print 'threads', 98
for i in range(nthreads):
threads[i].join()
assert sum(result) == nthreads
More information about the pypy-commit
mailing list