diff --git a/src/ZEO/tests/multi.py b/src/ZEO/tests/multi.py index 578b8d12add30095aa1ecc00920a7618a98d8337..326ed6a713d3bd35976a76bfd81e484ef80e4960 100644 --- a/src/ZEO/tests/multi.py +++ b/src/ZEO/tests/multi.py @@ -116,7 +116,9 @@ def main(client_func=None): t0 = time.time() server_pid, server = start_server(addr) t1 = time.time() - pids = [start_client(addr, client_func) for i in range(CLIENTS)] + pids = [] + for i in range(CLIENTS): + pids.append(start_client(addr, client_func)) for pid in pids: assert type(pid) == types.IntType, "invalid pid type: %s (%s)" % \ (repr(pid), type(pid)) diff --git a/src/ZEO/tests/speed.py b/src/ZEO/tests/speed.py index 037a7fdfd34175db5392a09acbe46829e8b7ba15..c57d37e5cc2787b40d0f07089c35e0a798b9b25e 100644 --- a/src/ZEO/tests/speed.py +++ b/src/ZEO/tests/speed.py @@ -243,10 +243,12 @@ def main(args): results={1:[], 10:[], 100:[], 1000:[]} if threads > 1: import threading - l = [threading.Thread(target=work, - args=(db, results, nrep, compress, data, - detailed, minimize, i)) - for i in range(threads)] + l = [] + for i in range(threads): + t = threading.Thread(target=work, + args=(db, results, nrep, compress, data, + detailed, minimize, i)) + l.append(t) for t in l: t.start() for t in l: @@ -263,7 +265,9 @@ def main(args): print '-'*24 print "num\tmean\tmin\tmax" for r in 1, 10, 100, 1000: - times = [time for time, conf in results[r]] + times = [] + for time, conf in results[r]: + times.append(time) t = mean(times) print "%d\t%.4f\t%.4f\t%.4f" % (r, t, min(times), max(times))