[tox] basepython = python3.13 envlist = py{310,311,312,313,314,py310}-{low,release,appinstall} mypy async nowebauthn nobabel noauthlib style docs coverage makedist skip_missing_interpreters = false [testenv] allowlist_externals = tox [testenv:pypy310-release] deps = -r requirements/tests.txt commands = tox -e compile_catalog pytest -W ignore --basetemp={envtmpdir} {posargs:tests} [testenv:py{310,311,312,313,314}-release] deps = -r requirements/tests.txt commands = tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:py{310,311,312,313,314,py310}-low] deps = pytest extras = low commands = tox -e compile_catalog pytest -W ignore --basetemp={envtmpdir} {posargs:tests} # manual test to check how we're keeping up with Pallets latest [testenv:main] basepython = python3.14 deps = -r requirements/tests.txt git+https://github.com/pallets/werkzeug@main#egg=werkzeug git+https://github.com/pallets/flask@main#egg=flask git+https://github.com/pallets/flask-sqlalchemy@main#egg=flask-sqlalchemy git+https://github.com/pallets/jinja@main#egg=jinja2 git+https://github.com/pallets-eco/flask-principal@main#egg=flask-principal git+https://github.com/wtforms/wtforms@main#egg=wtforms git+https://github.com/maxcountryman/flask-login@main#egg=flask-login commands = tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:async] deps = -r requirements/tests.txt commands = pip install flask[async] tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:nowebauthn] deps = -r requirements/tests.txt commands = pip uninstall -y webauthn tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:nobabel] deps = -r requirements/tests.txt commands = pip uninstall -y babel flask_babel pytest --basetemp={envtmpdir} {posargs:tests} [testenv:noauthlib] deps = -r requirements/tests.txt commands = pip uninstall -y authlib tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:noflasksqlalchemy] deps = -r requirements/tests.txt commands = pip uninstall -y flask_sqlalchemy flask_sqlalchemy_lite tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs:tests} [testenv:style] deps = pre-commit skip_install = true commands = pre-commit autoupdate pre-commit run --all-files --show-diff-on-failure [testenv:docs] deps = -r requirements/docs.txt commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html [testenv:coverage] deps = -r requirements/tests.txt commands = tox -e compile_catalog coverage run --source=flask_security -m pytest coverage xml [testenv:realpostgres] deps = -r requirements/tests.txt psycopg2-binary commands = # Requires that --realdburl be set otherwise doesn't actually use DB tox -e compile_catalog pytest --basetemp={envtmpdir} {posargs} [testenv:makedist] deps = -r requirements/tests.txt flit twine check-wheel-contents commands = tox -e compile_catalog flit build --no-use-vcs check-wheel-contents dist [testenv:makedist-too] deps = -r requirements/tests.txt flit twine check-wheel-contents commands = tox -e compile_catalog flit -f pyproject-too.toml build --no-use-vcs check-wheel-contents dist [testenv:mypy] deps = -r requirements/tests.txt mypy commands = mypy --install-types --non-interactive flask_security tests [testenv:py{310,311,312,313,314}-appinstall] commands = python -c "from flask_security import Security; s = Security()" [testenv:compile_catalog] deps = babel skip_install = true commands = pybabel compile --domain flask_security -d flask_security/translations [testenv:extract_messages] deps = babel jinja2 skip_install = true commands = pybabel extract --version 5.8.2 --keyword=_fsdomain --project=Flask-Security \ -o flask_security/translations/flask_security.pot \ --msgid-bugs-address=jwag956@github.com --mapping-file=babel.ini \ --add-comments=NOTE flask_security [testenv:update_catalog] deps = babel skip_install = true commands = pybabel update --domain flask_security -i flask_security/translations/flask_security.pot \ -d flask_security/translations --no-fuzzy-matching [flake8] max-line-length = 88 per-file-ignores = tests/view_scaffold.py: E402