From 11bca773dd30c72943cc44b728eff50e2fa04b08 Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Fri, 27 Oct 2023 10:00:04 +0200 Subject: [PATCH] Let pytest report he TOP20 of slowest tests This should help to identify exceptionally slow tests that cause needless friction for iterations on PRs. --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 2624fcba..6183997c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -283,9 +283,9 @@ test_script: - sh: mkdir __testhome__ - cd __testhome__ # run test selecion (--traverse-namespace needed from Python 3.8 onwards) - - cmd: python -m pytest -s -v -m "not (turtle)" -k "%KEYWORDS%" --cov=datalad_next --pyargs %DTS% + - cmd: python -m pytest -s -v --durations 20 -m "not (turtle)" -k "%KEYWORDS%" --cov=datalad_next --pyargs %DTS% # also add --cov datalad, because some core test runs may not touch -next code - - sh: python -m pytest -s -v -m "not (turtle)" -k "$KEYWORDS" --cov=datalad_next --cov datalad --cov-config=../.coveragerc --pyargs ${DTS} + - sh: python -m pytest -s -v --durations 20 -m "not (turtle)" -k "$KEYWORDS" --cov=datalad_next --cov datalad --cov-config=../.coveragerc --pyargs ${DTS} after_test: