Skip to content

Commit 4677bee

Browse files
authored
Merge pull request #47 from per1234/report-size-deltas-pytest
libraries/report-size-deltas: switch to using pytest for unit testing framework
2 parents 9db71d7 + 74d5bc5 commit 4677bee

File tree

4 files changed

+397
-391
lines changed

4 files changed

+397
-391
lines changed

.github/workflows/libraries_report-size-deltas.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
with:
1616
python-version: '3.8.2'
1717

18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install --requirement "$GITHUB_WORKSPACE/libraries/report-size-deltas/requirements.txt"
22+
1823
- name: Lint with flake8
1924
run: |
2025
pip install --quiet flake8
@@ -24,4 +29,4 @@ jobs:
2429
- name: Run Python unit tests
2530
run: |
2631
export PYTHONPATH="$GITHUB_WORKSPACE/libraries/report-size-deltas"
27-
python -m unittest discover "$GITHUB_WORKSPACE/libraries/report-size-deltas/tests"
32+
pytest "$GITHUB_WORKSPACE/libraries/report-size-deltas/tests"

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest==5.4.1

tests/pytest.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[pytest]
2+
filterwarnings =
3+
error
4+
ignore::DeprecationWarning
5+
ignore::ResourceWarning
6+
7+
markers =
8+
slow: marks tests as slow (deselect with '-m "not slow"')

0 commit comments

Comments
 (0)