Skip to content

Commit 3405948

Browse files
authored
Replace nose with pytest and add Python 3.10 to testing matrix (#363)
* Replace nose with pytest * Update workflow to use pytest and include Python 3.10 * Add test notes
1 parent 994b794 commit 3405948

File tree

4 files changed

+221
-21
lines changed

4 files changed

+221
-21
lines changed

.github/workflows/run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [windows-latest, ubuntu-latest, macos-latest]
21-
python-version: ["3.7", "3.8", "3.9"]
21+
python-version: ["3.7", "3.8", "3.9", "3.10"]
2222
steps:
2323
- uses: actions/checkout@v2
2424
- name: Set up Python ${{ matrix.python-version }}
@@ -30,7 +30,7 @@ jobs:
3030
python -m pip install --upgrade pip poetry
3131
pip install ".[dev]"
3232
- name: Run tests
33-
run: nosetests
33+
run: pytest
3434
- name: Validate poetry file
3535
run: poetry check
3636

@@ -47,7 +47,7 @@ jobs:
4747
python3-pandas \
4848
python3-requests \
4949
python3-scipy \
50-
python3-nose \
50+
python3-pytest \
5151
git
5252
5353
# Note: "actions/checkout@v2" requires libstdc++6:amd64 to be
@@ -58,4 +58,4 @@ jobs:
5858

5959
- name: Run tests
6060
run: |
61-
nosetests3
61+
pytest-3

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ To upload a new distribution to PyPI:
7171
poetry publish
7272
```
7373

74+
### Tests
75+
76+
Run tests using pytest:
77+
78+
```sh
79+
pytest
80+
# Distribute tests across multiple cores.
81+
# https://github.com/pytest-dev/pytest-xdist
82+
pytest -n auto
83+
```
84+
7485
## Citing
7586

7687
When using this resource, please cite the software [publication](https://physionet.org/content/wfdb-python/) oh PhysioNet.

poetry.lock

Lines changed: 203 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ scipy = "^1.0.0"
1212
pandas = "^1.0.0"
1313
matplotlib = "^3.3.4"
1414
requests = "^2.8.1"
15-
nose = {version = "^1.3.7", optional = true}
15+
pytest = {version = "^7.1.1", optional = true}
16+
pytest-xdist = {version = "^2.5.0", optional = true}
1617

1718
[tool.poetry.extras]
18-
dev = ["nose"]
19+
dev = ["pytest", "pytest-xdist"]
1920

2021
# Do NOT use [tool.poetry.dev-dependencies]. See: https://github.com/python-poetry/poetry/issues/3514
2122

0 commit comments

Comments
 (0)