diff --git a/tox.ini b/tox.ini index 4997e45f3505..20eb439414cb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = True -envlist = py37-{lint,mypy}, docs +envlist = py37-{lint,mypy,test}, docs [travis] python = @@ -11,10 +11,23 @@ deps = lint: pylint~=2.3.1 mypy: mypy~=0.711 +setenv = + PYTHONPATH={toxinidir}/opentelemetry-api/src/ + mypy: MYPYPATH={env:PYTHONPATH} + +changedir = + test: opentelemetry-api/tests + commands = - py37-lint: pylint opentelemetry-api/src/opentelemetry/ +; Prefer putting everything in one pylint command to profit from duplication +; warnings. + py37-lint: pylint opentelemetry-api/src/opentelemetry/ opentelemetry-api/tests/ py37-mypy: mypy opentelemetry-api/src/opentelemetry/ +; For test code, we don't want to use the full mypy strictness, so we use its +; default flags instead. + py37-mypy: mypy opentelemetry-api/tests/ --config-file= + test: python -m unittest discover [testenv:docs] deps =