tito/tox.ini
Pavel Raiskup 167a91cb4f tests: make the fedora-tox.yml working
This is tricky.  Note the sys.path hack in test/unit/__init__.py where
we intentionally use the Fedora's default Python libraries with a
different Python version selected by Tox.  Right now it means that we
use, e.g., python3-rpm compiled for Python 3.12 (F39) with Python 3.7
(which probably works because Tox is executed as root in the tox
container, overwriting the pre-compiled *.pyc files in container).

Some tests need to be skipped in Tox, therefore the skip_if_tox()
method.

Also, the GitHub's action for 'git checkout' provides somewhat
non-standard environment for Tito to work, hence the fix_tox_env()
configuration method.
2024-11-06 11:19:55 +01:00

30 lines
616 B
INI

# ignore errors:
# E12* are continuation line indention related
# E501 is line too long
# See http://pep8.readthedocs.org/en/latest/intro.html#id1
[flake8]
ignore=E124,E125,E127,E128,E501
# Exclude the build directory that distutils creates
exclude=build/*
max-line-length=120
[tox]
# sync with /.github/workflows/fedora-tox.yml
envlist = py{36,37,311,312,313}
skipsdist = True
[testenv]
deps =
-rrequirements.txt
coverage
pycodestyle
pytest
pytest-cov
commands =
python -m pytest -v {posargs} --cov-report term-missing --cov-branch --cov
setenv =
PYTHONPATH = ./src
syspaths = True