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