From 3927e75ef169c5451be7af0aacf24fd0e7c057cc Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 4 Dec 2023 11:23:12 +0200 Subject: [PATCH] testing: bench: add pytest_report_header (#10132) * testing: bench: add pytest_report_header Useful for sanity checks in logs. * Update dvc/testing/benchmarks/plugin.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- dvc/testing/benchmarks/plugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dvc/testing/benchmarks/plugin.py b/dvc/testing/benchmarks/plugin.py index 9afc9e9f5..59757ec28 100644 --- a/dvc/testing/benchmarks/plugin.py +++ b/dvc/testing/benchmarks/plugin.py @@ -4,6 +4,11 @@ DEFAULT_DVC_BENCH_GIT_REPO = "https://github.com/iterative/dvc-bench" DEFAULT_PROJECT_GIT_REPO = "https://github.com/iterative/example-get-started" +def pytest_report_header(config): + bconf = config.bench_config + return "dvc-bench: (" f"size: '{bconf.size}'," f"revs: '{bconf.dvc_revs}'" ")" + + def pytest_generate_tests(metafunc): str_revs = metafunc.config.getoption("--dvc-revs") revs = str_revs.split(",") if str_revs else [None]