summaryrefslogtreecommitdiff
path: root/testing/tests/perf/conftest.py
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2016-08-22 18:00:52 -0300
committerVictor Shyba <victor.shyba@gmail.com>2016-08-22 18:49:18 -0300
commit4f5ecb4c719a3a842d852fbaab549d2881d6528f (patch)
treedcf6698e8556f09de0f54ec925ce760a58693a70 /testing/tests/perf/conftest.py
parentcf91133809bab11ee43f20178944f91b1466bfd5 (diff)
[test] make txbench ignore kwargs for readability
They arent used so far and using empty dicts to make them work is ugly. Removing it leaves the return function on setup code clean and readable.
Diffstat (limited to 'testing/tests/perf/conftest.py')
-rw-r--r--testing/tests/perf/conftest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/testing/tests/perf/conftest.py b/testing/tests/perf/conftest.py
index fca9c58d..68e0fb38 100644
--- a/testing/tests/perf/conftest.py
+++ b/testing/tests/perf/conftest.py
@@ -193,7 +193,11 @@ def txbenchmark_with_setup(benchmark):
return threads.blockingCallFromThread(reactor, f, *args, **kwargs)
def blocking_setup():
- return threads.blockingCallFromThread(reactor, setup)
+ args = threads.blockingCallFromThread(reactor, setup)
+ try:
+ return tuple(arg for arg in args), {}
+ except TypeError:
+ return ((args,), {}) if args else None
def bench():
return benchmark.pedantic(blocking_runner, setup=blocking_setup,