2021-02-06 20:07:42 +01:00
|
|
|
[tox]
|
2023-09-04 08:49:34 +02:00
|
|
|
requires = virtualenv<20.22.0
|
2022-05-09 18:36:27 +02:00
|
|
|
envlist = reset,py{27,27-portable,35,36,38,39,310},stats
|
2021-02-06 20:07:42 +01:00
|
|
|
skip_missing_interpreters = true
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
setenv =
|
|
|
|
BITMESSAGE_HOME = {envtmpdir}
|
2022-04-07 10:35:38 +02:00
|
|
|
HOME = {envtmpdir}
|
2021-11-18 16:44:35 +01:00
|
|
|
PYTHONWARNINGS = default
|
2021-02-06 20:07:42 +01:00
|
|
|
deps = -rrequirements.txt
|
|
|
|
commands =
|
|
|
|
python checkdeps.py
|
2023-09-22 23:11:06 +02:00
|
|
|
python src/bitmessagemain.py -t
|
2021-02-06 20:07:42 +01:00
|
|
|
coverage run -a -m tests
|
|
|
|
|
2022-04-05 00:34:35 +02:00
|
|
|
[testenv:lint-basic]
|
2023-09-19 23:29:16 +02:00
|
|
|
skip_install = true
|
2022-05-09 18:36:27 +02:00
|
|
|
basepython = python3
|
2022-04-05 00:34:35 +02:00
|
|
|
deps =
|
|
|
|
bandit
|
|
|
|
flake8
|
|
|
|
commands =
|
2024-03-06 11:44:52 +01:00
|
|
|
bandit -r -s B101,B411,B413,B608 \
|
2022-04-05 00:34:35 +02:00
|
|
|
-x checkdeps.*,bitmessagecurses,bitmessageqt,tests pybitmessage
|
|
|
|
flake8 pybitmessage --count --select=E9,F63,F7,F82 \
|
|
|
|
--show-source --statistics
|
|
|
|
|
2024-04-09 00:32:26 +02:00
|
|
|
[testenv:lint]
|
|
|
|
skip_install = true
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
-rrequirements.txt
|
|
|
|
pylint
|
|
|
|
commands = pylint --rcfile=tox.ini --exit-zero pybitmessage
|
|
|
|
|
2022-04-07 10:35:38 +02:00
|
|
|
[testenv:py27]
|
|
|
|
sitepackages = true
|
|
|
|
|
2021-11-21 18:03:29 +01:00
|
|
|
[testenv:py27-doc]
|
|
|
|
deps =
|
|
|
|
.[docs]
|
|
|
|
-r docs/requirements.txt
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
2021-11-18 16:44:35 +01:00
|
|
|
[testenv:py27-portable]
|
|
|
|
skip_install = true
|
|
|
|
commands = python pybitmessage/bitmessagemain.py -t
|
|
|
|
|
2023-09-19 23:29:16 +02:00
|
|
|
[testenv:py35]
|
|
|
|
skip_install = true
|
|
|
|
|
2021-02-06 20:07:42 +01:00
|
|
|
[testenv:reset]
|
2023-09-19 23:29:16 +02:00
|
|
|
skip_install = true
|
2021-11-18 16:44:35 +01:00
|
|
|
deps = coverage
|
2021-02-06 20:07:42 +01:00
|
|
|
commands = coverage erase
|
|
|
|
|
|
|
|
[testenv:stats]
|
2023-09-19 23:29:16 +02:00
|
|
|
skip_install = true
|
2021-11-18 16:44:35 +01:00
|
|
|
deps = coverage
|
2021-02-06 20:07:42 +01:00
|
|
|
commands =
|
|
|
|
coverage report
|
|
|
|
coverage xml
|
|
|
|
|
|
|
|
[coverage:run]
|
|
|
|
source = src
|
|
|
|
omit =
|
|
|
|
tests.py
|
|
|
|
*/tests/*
|
2022-09-17 03:31:42 +02:00
|
|
|
src/bitmessagekivy/*
|
2021-02-06 20:07:42 +01:00
|
|
|
src/version.py
|
|
|
|
src/fallback/umsgpack/*
|
|
|
|
|
|
|
|
[coverage:report]
|
|
|
|
ignore_errors = true
|
2024-04-09 00:32:26 +02:00
|
|
|
|
|
|
|
[pylint.main]
|
|
|
|
disable =
|
|
|
|
invalid-name,consider-using-f-string,fixme,raise-missing-from,
|
|
|
|
super-with-arguments,unnecessary-pass,unknown-option-value,
|
|
|
|
unspecified-encoding,useless-object-inheritance,useless-option-value
|
|
|
|
ignore = bitmessagecurses,bitmessagekivy,bitmessageqt,messagetypes,mockbm,
|
|
|
|
network,plugins,umsgpack,bitmessagecli.py
|
|
|
|
|
|
|
|
max-args = 8
|
|
|
|
max-attributes = 8
|