2015-02-04 13:22:43 +00:00
|
|
|
[tox]
|
2023-03-27 17:46:22 +00:00
|
|
|
minversion = 2.4
|
2023-05-12 18:06:49 +00:00
|
|
|
envlist = python3, pep8, lint, mypy
|
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
|
2015-02-04 13:22:43 +00:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2020-09-19 15:57:53 +00:00
|
|
|
deps = {[testenv]deps}
|
|
|
|
pycodestyle
|
2020-09-26 18:34:00 +00:00
|
|
|
commands_pre = pycodestyle --version
|
2023-06-20 19:50:53 +00:00
|
|
|
commands = pycodestyle setools/ setoolsgui/ tests/ tests-gui/ 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}
|
2023-03-27 17:46:22 +00:00
|
|
|
coverage>=5.0
|
|
|
|
extras = toml
|
2020-09-26 18:34:00 +00:00
|
|
|
commands_pre = coverage --version
|
2015-02-16 10:13:25 +00:00
|
|
|
coverage erase
|
2020-09-26 18:34:00 +00:00
|
|
|
{envpython} setup.py build_ext -i
|
2023-03-23 13:35:41 +00:00
|
|
|
commands = coverage run -m pytest tests
|
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}
|
2021-07-28 17:25:10 +00:00
|
|
|
pylint>=2.8.0
|
2023-05-11 19:30:35 +00:00
|
|
|
PyQt5>=5.15.0
|
2023-06-20 19:50:53 +00:00
|
|
|
pytest-qt
|
2020-09-19 15:57:53 +00:00
|
|
|
commands_pre = pylint --version
|
|
|
|
{envpython} setup.py build_ext -i
|
2023-06-20 19:50:53 +00:00
|
|
|
commands = pylint -E setools setoolsgui tests tests-gui seinfo seinfoflow sedta sesearch sediff sechecker apol
|
2015-02-04 13:22:43 +00:00
|
|
|
|
2020-10-02 19:40:12 +00:00
|
|
|
[testenv:mypy]
|
|
|
|
deps = {[testenv]deps}
|
2023-03-27 13:18:01 +00:00
|
|
|
types-setuptools
|
2023-05-11 19:30:35 +00:00
|
|
|
PyQt5>=5.15.0
|
2020-10-02 19:40:12 +00:00
|
|
|
mypy
|
|
|
|
commands_pre = mypy --version
|
2023-06-20 19:50:53 +00:00
|
|
|
commands = mypy -p setools -p setoolsgui -p tests -p tests-gui
|
|
|
|
mypy --scripts-are-modules seinfo seinfoflow sedta sesearch sediff sechecker apol
|
2020-10-02 19:40:12 +00:00
|
|
|
|
2023-04-17 14:16:51 +00:00
|
|
|
[testenv:install]
|
|
|
|
deps = {[testenv]deps}
|
|
|
|
commands = {envpython} -m pip install --use-pep517 .
|
|
|
|
|
2023-06-20 19:50:53 +00:00
|
|
|
[testenv:gui]
|
|
|
|
passenv = DISPLAY
|
|
|
|
XAUTHORITY
|
|
|
|
deps = {[testenv]deps}
|
|
|
|
PyQt5>=5.15.0
|
|
|
|
pytest-qt
|
|
|
|
pytest-xvfb
|
|
|
|
commands = {envpython} -m pytest tests-gui
|
|
|
|
|
2015-02-04 13:22:43 +00:00
|
|
|
[testenv]
|
2018-06-19 00:25:14 +00:00
|
|
|
passenv = USERSPACE_SRC
|
2023-10-06 14:04:10 +00:00
|
|
|
deps = networkx>=2.6
|
2023-03-27 17:46:22 +00:00
|
|
|
cython>=0.29.14
|
|
|
|
pytest>=6.0
|
2020-09-26 18:34:00 +00:00
|
|
|
commands_pre = {envpython} setup.py build_ext -i
|
2023-06-20 19:50:53 +00:00
|
|
|
commands = {envpython} -m pytest tests
|