2015-02-04 13:22:43 +00:00
|
|
|
[tox]
|
2015-02-16 10:13:25 +00:00
|
|
|
minversion = 1.4
|
2020-09-19 15:57:53 +00:00
|
|
|
envlist = py3, pep8, lint
|
2015-02-16 10:13:25 +00:00
|
|
|
|
2018-08-11 18:38:58 +00:00
|
|
|
[pycodestyle]
|
2015-02-16 10:13:25 +00:00
|
|
|
max-line-length = 100
|
2018-08-11 18:38:58 +00:00
|
|
|
# W605 ignored because pycodestyle gets confused by a regex string
|
|
|
|
# in AVRuleTest test_103_statement_two_perms_cond
|
|
|
|
ignore = W605
|
2015-02-04 13:22:43 +00:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2020-09-19 15:57:53 +00:00
|
|
|
deps = {[testenv]deps}
|
|
|
|
pycodestyle
|
2018-08-11 18:38:58 +00:00
|
|
|
commands = pycodestyle --version
|
2020-09-19 15:57:53 +00:00
|
|
|
pycodestyle setools/ setoolsgui/ tests/ seinfo seinfoflow sedta sesearch sediff sechecker apol --statistics
|
2015-02-16 10:13:25 +00:00
|
|
|
|
2015-04-06 14:07:22 +00:00
|
|
|
[testenv:coverage]
|
2018-03-06 01:33:02 +00:00
|
|
|
setenv = SETOOLS_COVERAGE = 1
|
2020-09-19 15:57:53 +00:00
|
|
|
deps = {[testenv]deps}
|
2018-03-06 01:33:02 +00:00
|
|
|
coverage>=4.0
|
2015-02-16 10:13:25 +00:00
|
|
|
commands = coverage --version
|
|
|
|
coverage erase
|
2018-03-06 01:33:02 +00:00
|
|
|
coverage run setup.py test -q
|
2015-02-16 10:13:25 +00:00
|
|
|
coverage report
|
2015-02-04 13:22:43 +00:00
|
|
|
|
2015-04-06 13:38:58 +00:00
|
|
|
[testenv:lint]
|
2020-09-19 15:57:53 +00:00
|
|
|
deps = {[testenv]deps}
|
|
|
|
pylint
|
|
|
|
commands_pre = pylint --version
|
|
|
|
{envpython} setup.py build_ext -i
|
|
|
|
commands = pylint -E --rcfile .pylintrc setools tests seinfo seinfoflow sedta sesearch sediff sechecker
|
2015-06-03 17:33:11 +00:00
|
|
|
# pylint can't see all members introduced by PyQt uic
|
2020-09-19 15:57:53 +00:00
|
|
|
pylint -E --rcfile .pylintrc --disable=no-member,import-error setoolsgui apol
|
2015-02-04 13:22:43 +00:00
|
|
|
|
|
|
|
[testenv]
|
2018-06-19 00:25:14 +00:00
|
|
|
passenv = USERSPACE_SRC
|
2017-09-23 18:03:26 +00:00
|
|
|
deps = networkx==2.0
|
2017-12-20 16:30:32 +00:00
|
|
|
cython>=0.27
|
2015-02-16 10:13:25 +00:00
|
|
|
commands = {envpython} setup.py test
|