Skip to content

Commit e66de92

Browse files
NoodlesNZCopilot
andauthored
Convert unit tests to Pytest (#276)
This PR modernizes the testing framework replacing the unittest framework with pytest. pytest provides clearer assertions, powerful fixtures, and an extensive plugin ecosystem, which will make tests easier to write, maintain, and extend going forward. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent beca8cc commit e66de92

File tree

6 files changed

+650
-544
lines changed

6 files changed

+650
-544
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,15 @@ jobs:
2525

2626
# Steps represent a sequence of tasks that will be executed as part of the job
2727
steps:
28-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29-
- uses: actions/checkout@v3
30-
# install newest pip
31-
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v4
33-
with:
34-
python-version: ${{ matrix.python-version }}
35-
- name: Install pip
36-
run: python -m pip install --upgrade pip setuptools wheel
37-
# install requirements
38-
- name: Install requirements
39-
run: |
40-
python -m pip install --upgrade pip
41-
pip install -r requirements.txt
42-
# Runs a set of commands using the runners shell
43-
- name: Run pytm tests
44-
run: |
45-
python3 -m unittest
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- uses: actions/checkout@v4
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v6
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
- name: Install Poetry
35+
run: pip install poetry
36+
- name: Install dependencies
37+
run: poetry install --with dev
38+
- name: Run tests
39+
run: poetry run pytest

0 commit comments

Comments
 (0)