1 Star 0 Fork 0

iStop/hh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tox.ini 6.65 KB
一键复制 编辑 原始数据 按行查看 历史
[tox]
envlist = tests
skipsdist = true
requires =
tox>=3.16.1,<4
tox-faster
tox-pyenv
tox-envfile
tox-run-command
# Exclusively use Python commands from pyenv's copies of Python, don't fall
# back to tox's default non-pyenv command search strategy.
tox_pyenv_fallback = false
[pytest]
filterwarnings =
# Fail the tests if there are any warnings.
error
# Ignore certain specific warnings. One line per warning to ignore. The
# pattern is:
#
# ignore:<WARNING_MESSAGE>:<WARNING_CATEGORY>:<MODULE>
#
# <WARNING_MESSAGE> is a regex that must match the warning message that you
# want to ignore.
#
# <WARNING_CATEGORY> is the class of the warning that you want to ignore,
# e.g. DeprecationWarning. See:
# https://docs.python.org/2/library/warnings.html#warning-categories
#
# <MODULE> is the name of the module that the warning originates from.
#
# See https://docs.python.org/3/library/warnings.html and
# https://docs.pytest.org/en/latest/warnings.html
ignore:^Use of \.\. or absolute path in a resource path is not allowed and will raise exceptions in a future release\.$:DeprecationWarning:pkg_resources
ignore:^Use of \.\. or absolute path in a resource path is not allowed and will raise exceptions in a future release\.$:DeprecationWarning:pyramid
ignore:^the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses$:DeprecationWarning:newrelic.api.import_hook
ignore:^The behavior of AcceptLanguageValidHeader\.__iter__ is currently maintained for backward compatibility, but will change in the future.$:DeprecationWarning:webob.acceptparse
# pkg_resources is calling its own deprecated function? Anyway I don't think the problem is with us.
ignore:^Deprecated call to .pkg_resources\.declare_namespace\('.*'\).\.:DeprecationWarning:pkg_resources
# pkg_resources used in some of our dependencies
ignore:^pkg_resources is deprecated as an API$:DeprecationWarning:pkg_resources
ignore:^pkg_resources is deprecated as an API:DeprecationWarning:pyramid
ignore:^pkg_resources is deprecated as an API:DeprecationWarning:chameleon
ignore:^pkg_resources is deprecated as an API:DeprecationWarning:deform
# Usage of deprecated method of urllib3 within the elasticsearch library
ignore:^HTTPResponse.getheaders\(\) is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.$:DeprecationWarning:elasticsearch
# Ignore a warning triggered by pytest-cov that's out of our control.
# See https://github.com/pytest-dev/pytest-xdist/issues/840.
ignore:^The --rsyncdir command line argument and rsyncdirs config variable are deprecated\.:DeprecationWarning
# https://github.com/webpy/webpy/issues/732
ignore:^'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:webob
# https://foss.heptapod.net/python-libs/passlib/-/issues/148
ignore:^'crypt' is deprecated and slated for removal in Python 3.13:DeprecationWarning:passlib
[testenv]
skip_install = true
sitepackages = {env:SITE_PACKAGES:false}
passenv =
HOME
dev: BOUNCER_URL
dev: CLIENT_OAUTH_ID
dev: CLIENT_RPC_ALLOWED_ORIGINS
dev: CLIENT_URL
dev: GOOGLE_TAG_MANAGER_CONTAINER_ID
dev: H_GUNICORN_CERTFILE
dev: H_GUNICORN_KEYFILE
dev: SENTRY_DSN
dev: SENTRY_DSN_CLIENT
dev: SENTRY_DSN_FRONTEND
dev: SENTRY_ENVIRONMENT
dev: USE_HTTPS
dev: NEW_RELIC_LICENSE_KEY
dev: NEW_RELIC_APP_NAME
dev: NODE_ENV
dev: PROXY_AUTH
{tests,functests}: DATABASE_URL
{tests,functests}: ELASTICSEARCH_URL
{tests,functests}: PYTEST_ADDOPTS
functests: BROKER_URL
setenv =
PYTHONUNBUFFERED = 1
REPORT_FDW_USERS=lms-fdw report-fdw
dev: AUTHORITY = {env:AUTHORITY:localhost}
{tests,functests}: AUTHORITY = {env:AUTHORITY:example.com}
dev: DEV = {env:DEV:true}
dev: HTTP_HOST = {env:HTTP_HOST:localhost:5000}
dev: PYTHONPATH = .
dev: APP_URL = {env:APP_URL:http://localhost:5000}
dev: WEBSOCKET_URL = {env:WEBSOCKET_URL:ws://localhost:5001/ws}
dev: ENABLE_WEB = {env:ENABLE_WEB:true}
dev: ENABLE_WEBSOCKET = {env:ENABLE_WEBSOCKET:true}
dev: ENABLE_WORKER = {env:ENABLE_WORKER:true}
dev: ALEMBIC_CONFIG = {env:ALEMBIC_CONFIG:conf/alembic.ini}
dev: JWE_SECRET_LMS = {env:JWE_SECRET_LMS:SUPER_SECRET}
dev: WEB_CONCURRENCY = {env:WEB_CONCURRENCY:2}
tests: COVERAGE_FILE = {env:COVERAGE_FILE:.coverage.{envname}}
dev: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost/postgres}
dev: REPLICA_DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost/postgres}
tests: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost/h_tests}
functests: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost/h_functests}
OBJC_DISABLE_INITIALIZE_FORK_SAFETY = YES
SQLALCHEMY_SILENCE_UBER_WARNING=1
deps =
-r requirements/{env:TOX_ENV_NAME}.txt
whitelist_externals =
{dev,tests,functests}: sh
depends =
{coverage,functests}: tests
commands =
pip-sync-faster requirements/{env:TOX_ENV_NAME}.txt --pip-args '--disable-pip-version-check'
dev: {posargs:supervisord -c conf/supervisord-dev.conf}
lint: pylint {posargs:h} bin
lint: pylint --rcfile=tests/pyproject.toml tests bin
lint: pydocstyle h tests bin
lint: pycodestyle h tests bin
format: black h tests bin
format: isort --quiet --atomic h tests bin
checkformatting: black --check h tests bin
checkformatting: isort --quiet --check-only h tests bin
tests: sh bin/create-testdb h_tests
functests: sh bin/create-testdb h_functests
{tests,functests}: python3 -m h.scripts.init_db --delete --create
tests: python -m pytest --cov --cov-report= --cov-fail-under=0 --numprocesses logical --dist loadgroup {posargs:tests/unit/}
functests: python -m pytest {posargs:tests/functional/}
docs: sphinx-autobuild -qT --open-browser -b dirhtml -d {envdir}/doctrees docs {envdir}/html
checkdocs: sphinx-build -qTWn -b dirhtml -d {envdir}/doctrees docs {envdir}/html
coverage: coverage combine
coverage: coverage report
[testenv:dev]
# By default when you Ctrl-c the `make dev` command tox is too aggressive about
# killing supervisor. tox kills supervisor before supervisor has had time to
# stop or kill its child processes, resulting in detached child processes being
# left running and other problems.
#
# Fix this by configuring tox to wait a long time before sending any further
# SIGINTs (after the first one) or SIGTERMs or SIGKILLs to supervisor.
# Just trust supervisor to clean up all its child processes and stop.
suicide_timeout = 60.0
interrupt_timeout = 60.0
terminate_timeout = 60.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/istop/h_.git
git@gitee.com:istop/h_.git
istop
h_
hh
main

搜索帮助