Add tests requirements and tox.ini

This commit is contained in:
Dmitri Bogomolov 2021-03-07 23:41:13 +02:00
parent 070541922b
commit fc877d708c
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
3 changed files with 28 additions and 0 deletions

View File

@ -6,6 +6,7 @@ python:
- "3.8" - "3.8"
- "3.9" - "3.9"
install: install:
- pip install -r requirements.txt
- python setup.py install - python setup.py install
script: script:
- ./start.sh --data-dir /tmp --connection-limit 16 & - ./start.sh --data-dir /tmp --connection-limit 16 &

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
coverage
psutil

25
tox.ini Normal file
View File

@ -0,0 +1,25 @@
[tox]
envlist = reset,py{37,38,39},stats
skip_missing_interpreters = true
[testenv]
deps = -rrequirements.txt
commands =
coverage run -a -m tests
[testenv:reset]
commands = coverage erase
[testenv:stats]
commands =
coverage report
coverage xml
[coverage:run]
source = minode
omit =
tests.py
*/tests/*
[coverage:report]
ignore_errors = true