Skip to content

Commit 6d22aaf

Browse files
committed
Switch to pytest as test runner
1 parent ca395d1 commit 6d22aaf

File tree

4 files changed

+85
-7
lines changed

4 files changed

+85
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
pipenv run pylint msgraphcore --disable=W --rcfile=.pylintrc
3939
- name: Test with unittest
4040
run: |
41-
pipenv run coverage run -m unittest discover tests/unit
42-
pipenv run coverage run -m unittest discover tests/integration
41+
pipenv run coverage run -m pytest tests/unit
42+
pipenv run coverage run -m pytest tests/integration
4343
pipenv run coverage html

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,17 @@ repos:
2323
language: system
2424
entry: pipenv run pylint msgraphcore --disable=W --rcfile=.pylintrc
2525
types: [python]
26+
27+
- id: pytest-unit
28+
name: pytest-unit
29+
stages: [commit]
30+
language: system
31+
entry: pipenv run coverage run -m pytest tests/unit
32+
types: [python]
33+
34+
- id: pytest-integration
35+
name: pytest-integration
36+
stages: [commit]
37+
language: system
38+
entry: pipenv run coverage run -m pytest tests/integration
39+
types: [python]

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ isort = "==5.7.0"
1616
yapf = "==0.30.0"
1717
mypy = "==0.800"
1818
pylint = "==2.7.4"
19+
pytest = "*"

Pipfile.lock

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

0 commit comments

Comments
 (0)