From fbc1c10aab0535d72820bad04019fb5461855da3 Mon Sep 17 00:00:00 2001 From: daklauss Date: Tue, 3 Dec 2024 12:22:20 +0100 Subject: [PATCH] Change unittest to pytest --- .github/workflows/pipeline.yml | 5 +++-- pyproject.toml | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 6f23fe8d2..8dad51e23 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -65,11 +65,12 @@ jobs: - name: Install run: | - pip install -e ./[testing] + pip install ./[testing] - name: Test run: | - python -m unittest discover -s tests + pip show ax-platform + pytest tests -m "not slow and not local" - name: Install pypa/build run: | diff --git a/pyproject.toml b/pyproject.toml index 7797ba862..53a021bef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ dependencies = [ testing = [ "certifi", # tries to prevent certificate problems on windows "pytest", + "coverage", "pre-commit", # system tests run pre-commit "ax-platform>=0.3.5", ] @@ -54,7 +55,6 @@ docs = [ "sphinx_copybutton>=0.5.1", "sphinx-sitemap>=2.5.0", ] - ax = [ "ax-platform>=0.3.5", ] @@ -76,3 +76,9 @@ line-length = 88 testpaths = [ "tests", ] +pythonpath = [ + "tests", +] +markers = [ + "slow: marks tests as slow (deselect with '-m \"not slow\"')", +]