From 3f3d75c2957398f4335b41ea7c3f476353b336b8 Mon Sep 17 00:00:00 2001 From: "Peter St. John" Date: Fri, 24 Jan 2025 10:21:45 -0800 Subject: [PATCH] add options for pytest duration logging Signed-off-by: Peter St. John --- .github/workflows/unit-tests.yml | 4 ++-- ci/scripts/run_pytest.sh | 2 -- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index aa1570174..f73c23625 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -127,7 +127,7 @@ jobs: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'INCLUDE_SLOW_TESTS')) env: BIONEMO_DATA_SOURCE: ngc - run: pytest -m "slow" sub-packages/ + run: pytest -v -m "slow" sub-packages/ - name: Run notebook tests if: | @@ -136,7 +136,7 @@ jobs: contains(github.event.pull_request.labels.*.name, 'INCLUDE_NOTEBOOKS_TESTS')) env: BIONEMO_DATA_SOURCE: ngc - run: pytest --nbval-lax -p no:python docs/ sub-packages/ + run: pytest -v --nbval-lax -p no:python docs/ sub-packages/ - name: Upload coverage to Codecov # Don't run coverage on merge queue CI to avoid duplicating reports diff --git a/ci/scripts/run_pytest.sh b/ci/scripts/run_pytest.sh index 633a3cc80..8fe2a899e 100755 --- a/ci/scripts/run_pytest.sh +++ b/ci/scripts/run_pytest.sh @@ -79,8 +79,6 @@ uname -a # Set up pytest options PYTEST_OPTIONS=( -v - --durations=0 - --durations-min=30.0 --cov=bionemo --cov-append --cov-report=xml:coverage.xml diff --git a/pyproject.toml b/pyproject.toml index 235aa5154..3a849903b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -112,7 +112,7 @@ convention = "google" [tool.pytest.ini_options] norecursedirs = ["3rdparty"] -addopts = ["--ignore=3rdparty"] +addopts = ["--durations-min=30.0", "--durations=0", "--ignore=3rdparty"] markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"] [tool.pyright]