Run tests with pytest
This commit is contained in:
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@@ -2,10 +2,10 @@ name: build
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: lint
|
name: lint
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, 'microdot')
|
sys.path.insert(0, 'src')
|
||||||
sys.path.insert(1, 'microdot-asyncio')
|
|
||||||
sys.path.insert(2, 'tests/libs')
|
sys.path.insert(2, 'tests/libs')
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|||||||
12
tox.ini
12
tox.ini
@@ -13,17 +13,17 @@ python =
|
|||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands=
|
commands=
|
||||||
pip install -e microdot
|
pip install -e .
|
||||||
pip install -e microdot-asyncio
|
pytest -p no:logging --cov=src --cov-branch --cov-report=term-missing
|
||||||
coverage run --branch --include="microdot*.py" -m unittest tests
|
deps=
|
||||||
coverage report --show-missing
|
pytest
|
||||||
deps=coverage
|
pytest-cov
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
deps=
|
deps=
|
||||||
flake8
|
flake8
|
||||||
commands=
|
commands=
|
||||||
flake8 --ignore=W503 --exclude tests/libs microdot microdot-asyncio tests
|
flake8 --ignore=W503 --exclude tests/libs src tests
|
||||||
|
|
||||||
[testenv:upy]
|
[testenv:upy]
|
||||||
whitelist_externals=sh
|
whitelist_externals=sh
|
||||||
|
|||||||
Reference in New Issue
Block a user