summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-07-17 15:16:35 -0300
committerdrebs <drebs@leap.se>2017-07-18 13:51:08 -0300
commit465737c82439fd4fa32c4a89c5e84b1bca7fc4d7 (patch)
tree794c868f2a53b82932994b59c395be49e9d6ee99
parentb5e1a45b3c85eca52c116b595f58a6eec5d9664a (diff)
[benchmarks] store test function docstring
-rw-r--r--testing/tests/benchmarks/conftest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/tests/benchmarks/conftest.py b/testing/tests/benchmarks/conftest.py
index e31f98c4..8a82b012 100644
--- a/testing/tests/benchmarks/conftest.py
+++ b/testing/tests/benchmarks/conftest.py
@@ -141,6 +141,11 @@ def _monitored_benchmark(benchmark_fixture, benchmark_function, request,
benchmark_fixture.extra_info.update({
'memory_percent': watcher.memory_percent,
})
+ # add docstring info
+ if request.scope == 'function':
+ fun = request.function
+ doc = fun.__doc__
+ benchmark_fixture.extra_info.update({'doc': doc or ''})
def _watch_memory(request):