Skip to content

Commit

Permalink
testing: bench: add pytest_report_header (#10132)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
efiop and pre-commit-ci[bot] authored Dec 4, 2023
1 parent e5ae5ef commit 3927e75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dvc/testing/benchmarks/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
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]
Expand Down

0 comments on commit 3927e75

Please sign in to comment.