use tox to run tests

This commit is contained in:
Vincent Poulailleau 2019-12-02 18:17:59 +01:00
parent c783110e5a
commit 2a598c54e0
2 changed files with 29 additions and 1 deletions

View File

@ -30,4 +30,23 @@ tox = "3.14.1"
twine = "2.0.0"
[tool.poetry.scripts]
padpo = "padpo.padpo:main"
padpo = "padpo.padpo:main"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = True
envlist = py36, py37, py38
[testenv]
whitelist_externals = poetry
changedir = {toxinidir}/tests
commands =
poetry install -v
# poetry run pytest -s -vv --cov={envsitepackagesdir}/padpo
poetry run pytest -s -vv --cov=padpo
"""

View File

@ -0,0 +1,9 @@
from padpo.padpo import check_file
def test_hello():
assert True != False
def test_coverage():
check_file("/home/vincent/Documents/programmation/padpo/functions.po")