-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
26 lines (23 loc) · 1021 Bytes
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[tox]
envlist = py3-test,py3-lint,py3-flake8
module = pysros
[tox:jenkins]
envlist = py3-test-jenkins,py3-lint-jenkins,py3-flake8
[testenv]
deps=
test: pytest
test: pytest-cov
lint: pylint
flake8: flake8
flake8: flake8-import-order
install_command = pip install --extra-index-url https://dist-u.linx.net/linx-python {opts} {packages}
whitelist_externals = bash
commands=
test: py.test --cov={envsitepackagesdir}/{[tox]module} --cov-report=xml --cov-report=term-missing --junitxml=test_report_{envname}.xml {posargs}
lint: pylint {[tox]module} tests
# Check that all .py files contain the copyright
lint: bash -c 'for file in $(find {[tox]module} tests -name "*.py" -print); do if ! grep -q "# Copyright (c) [0-9,-]* London Internet Exchange Ltd." $file; then echo "ERROR: Missing copyright in " $file; exit 1; fi; done'
flake8: flake8 {[tox]module} tests --import-order-style=google --application-import-names={[tox]module}
recreate = jenkins: True
[pytest]
junit_family=xunit2