blob: b32b8b6597f146dbb4b70a9e5207b266d933d914 [file] [log] [blame]
;
; Copyright 2017 the original author or authors.
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
[tox]
;envlist = py27, py36, py3-analysis, py3-test
envlist = py27
minversion = 2.5.0
[package]
name = pyvoltha
[cov]
xml = --cov-report xml:{toxworkdir}/{envname}coverage.xml
term = --cov-report term-missing
html = --cov-report html:{toxworkdir}/{envname}cov
branch = --cov-branch
directory =--cov {envsitepackagesdir}/{[package]name}
coverage = {[cov]xml} {[cov]term} {[cov]html} {[cov]branch} {[cov]directory}
cov_fail_under=100
[pylama]
format = pylint
skip = */.tox/*,*/.env/*
linters = pep8,pylint
analysis_dirs = {[package]name} test
analysis = pylama {[pylama]analysis_dirs}
[pylama:pep8]
max_line_length=99
ignore = E203, W503, R0903
[pylama:test/*]
ignore = C0111,R0201,R0903
[pytest]
passenv = {env:PYTEST_ARGS}
flags =-vvl {env:PYTEST_ARGS:}
cov-fail-under=100
unit_results =--junitxml={toxworkdir}/{envname}_results.xml
test = py.test {[pytest]flags} {[pytest]unit_results}
with_metrics = {[pytest]test} {[cov]coverage}
[nosetests]
passenv =
[testenv]
changedir = test/unit
basepython =
py27: python2.7
;py3: python3
envdir =
py27: {toxworkdir}/.py27
;py3: {toxworkdir}/.py3
setenv =
COVERAGE_FILE = {envdir}/.coverage
PYTHONPATH = {toxinidir}:{toxinidir}/pyvoltha/protos/third_party
commands =
py27: nosetests {posargs}
; py3-test: {[pytest]with_metrics} test
; py3-no-coverage: {[pytest]test} test
; py3-unit: {[pytest]with_metrics} test/unit
; py3-component: {[pytest]with_metrics} test/component
; py3-adhoc: {posargs: bash -c 'echo must provide posargs with "tox args -- posargs"'}
; py3-analysis: {[pylama]analysis}
; py3-analysis: black --check {[pylama]analysis_dirs}
; py3-black: black {[pylama]analysis_dirs}
; py3-docs: sphinx-build -b html docs docs_out
deps =
nose
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt