diff options
Diffstat (limited to 'test/tools')
-rw-r--r-- | test/tools/benchtool.py | 1 | ||||
-rw-r--r-- | test/tools/inspect_dumpfile.py | 1 | ||||
-rw-r--r-- | test/tools/memoryleak.py | 4 | ||||
-rw-r--r-- | test/tools/passive_close.py | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/test/tools/benchtool.py b/test/tools/benchtool.py index ae4636a7..a1d80697 100644 --- a/test/tools/benchtool.py +++ b/test/tools/benchtool.py @@ -15,6 +15,7 @@ import click class ApacheBenchThread(Thread): + def __init__(self, concurrency): self.concurrency = concurrency super(ApacheBenchThread, self).__init__() diff --git a/test/tools/inspect_dumpfile.py b/test/tools/inspect_dumpfile.py index 8ba42c2a..d15e9e8a 100644 --- a/test/tools/inspect_dumpfile.py +++ b/test/tools/inspect_dumpfile.py @@ -15,6 +15,7 @@ def read_tnetstring(input): input.seek(-1, 1) return tnetstring.load(input) + @click.command() @click.argument("input", type=click.File('rb')) def inspect(input): diff --git a/test/tools/memoryleak.py b/test/tools/memoryleak.py index 47cfff38..259309a6 100644 --- a/test/tools/memoryleak.py +++ b/test/tools/memoryleak.py @@ -18,7 +18,7 @@ def str_fun(obj): return "(-locals-)" if "self" in obj and isinstance(obj["self"], refbrowser.InteractiveBrowser): return "(-browser-)" - return str(id(obj)) + ": " + str(obj)[:100].replace("\r\n","\\r\\n").replace("\n","\\n") + return str(id(obj)) + ": " + str(obj)[:100].replace("\r\n", "\\r\\n").replace("\n", "\\n") def request(ctx, flow): @@ -35,4 +35,4 @@ def request(ctx, flow): ib = refbrowser.InteractiveBrowser(ssl, 2, str_fun, repeat=False) del ssl # do this to unpollute view ib.main(True) - # print("\r\n".join(str(x)[:100] for x in gc.get_referrers(ssl)))
\ No newline at end of file + # print("\r\n".join(str(x)[:100] for x in gc.get_referrers(ssl))) diff --git a/test/tools/passive_close.py b/test/tools/passive_close.py index 7199ea70..5b1bd451 100644 --- a/test/tools/passive_close.py +++ b/test/tools/passive_close.py @@ -1,9 +1,9 @@ import SocketServer -from threading import Thread from time import sleep class service(SocketServer.BaseRequestHandler): + def handle(self): data = 'dummy' print "Client connected with ", self.client_address |