From 9ece7b12edff65588770905bb33c1440057464d1 Mon Sep 17 00:00:00 2001 From: porink0424 Date: Wed, 30 Oct 2024 18:22:53 +0900 Subject: [PATCH] Modified to run tests with `pytest` instead of `unittest` --- .github/workflows/tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbe0b97..bbaec92 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,9 +38,9 @@ jobs: architecture: x64 - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools numpy scipy hypothesis + python -m pip install --upgrade pip setuptools numpy scipy hypothesis pytest pip install --progress-bar off . - - run: python -m unittest + - run: python -m pytest tests --ignore=tests/test_free_threaded.py test-free-threaded: runs-on: ubuntu-latest steps: @@ -55,7 +55,7 @@ jobs: run: | python -m pip install --upgrade pip setuptools numpy hypothesis pytest pytest-freethreaded pip install --progress-bar off . - - run: python -m unittest + - run: python -m pytest --threads 1 --iterations 1 tests --ignore=tests/test_free_threaded.py # TODO: Using `unittest` style causes `pytest-freethreaded` to fail with `ConcurrencyError`. # Rewriting as top-level functions works, # so a follow-up is needed to refactor from `unittest` to `pytest`. @@ -70,7 +70,7 @@ jobs: architecture: x64 - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools scipy hypothesis + python -m pip install --upgrade pip setuptools scipy hypothesis pytest python -m pip install --pre --upgrade numpy pip install --progress-bar off . - - run: python -m unittest \ No newline at end of file + - run: python -m pytest tests --ignore=tests/test_free_threaded.py \ No newline at end of file