Skip to content

Commit 4c44177

Browse files
committed
Switch to pytest for Python unit tests CI
- Use pytest in the GitHub Actions workflow - Add a pytest configuration file
1 parent 8648c35 commit 4c44177

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/libraries_compile-examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
run: |
3333
export PYTHONPATH="$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches:$GITHUB_WORKSPACE/libraries/compile-examples/reportsizetrends"
3434
pytest "$GITHUB_WORKSPACE/libraries/compile-examples/compilesketches/tests"
35-
python -m unittest discover "$GITHUB_WORKSPACE/libraries/compile-examples/reportsizetrends/tests"
35+
pytest "$GITHUB_WORKSPACE/libraries/compile-examples/reportsizetrends/tests"

reportsizetrends/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
google-auth~=1.11
22
google-api-python-client~=1.7
3+
pytest==5.4.1

reportsizetrends/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)