代码拉取完成,页面将自动刷新
[pytest]
addopts = -ra
testpaths = tests
xfail_strict = true
filterwarnings =
once::Warning
ignore:::pympler[.*]
looponfailroots =
src
tests
# Keep docs in sync with docs env and .readthedocs.yml.
[gh]
python =
3.8 = py38, py38-numpy
3.9 = py39, py39-numpy
3.10 = py310, py310-numpy
3.11 = py311, py311-numpy
3.12 = py312, py312-numpy, lint, changelog, typing, docs
pypy3.9 = pypy3
[tox]
envlist = typing,lint,py38{,-numpy},py39{,-numpy},py310{,-numpy},py311{,-numpy},py312{,-numpy},pypy{,-numpy},pypy3{,-numpy},docs,pypi-description,changelog,coverage-report
isolated_build = True
[testenv]
# Prevent random setuptools/pip breakages like
# https://github.com/pypa/setuptools/issues/1042 from breaking our builds.
setenv =
VIRTUALENV_NO_DOWNLOAD=1
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = python -m pytest {posargs}
[testenv:py38-numpy]
extras = tests-numpy
commands = python -m pytest {posargs}
[testenv:py39-numpy]
extras = tests-numpy
commands = python -m pytest {posargs}
[testenv:py310-numpy]
extras = tests-numpy
commands = python -m pytest {posargs}
[testenv:py311-numpy]
extras = tests-numpy
commands = python -m pytest {posargs}
[testenv:py312-numpy]
extras = tests-numpy
commands = python -m pytest {posargs}
[testenv:py38]
# Python 3.6+ has a number of compile-time warnings on invalid string escapes.
# PYTHONWARNINGS=d and --no-compile below make them visible during the Tox run.
basepython = python3.8
setenv =
PYTHONWARNINGS=d
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run -m pytest {posargs}
[testenv:py39]
# Python 3.6+ has a number of compile-time warnings on invalid string escapes.
# PYTHONWARNINGS=d and --no-compile below make them visible during the Tox run.
basepython = python3.9
setenv =
PYTHONWARNINGS=d
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run -m pytest {posargs}
[testenv:py310]
# Python 3.6+ has a number of compile-time warnings on invalid string escapes.
# PYTHONWARNINGS=d and --no-compile below make them visible during the Tox run.
basepython = python3.10
setenv =
PYTHONWARNINGS=d
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run -m pytest {posargs}
[testenv:py311]
# Python 3.6+ has a number of compile-time warnings on invalid string escapes.
# PYTHONWARNINGS=d and --no-compile below make them visible during the Tox run.
basepython = python3.11
setenv =
PYTHONWARNINGS=d
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run -m pytest {posargs}
[testenv:py312]
# Python 3.6+ has a number of compile-time warnings on invalid string escapes.
# PYTHONWARNINGS=d and --no-compile below make them visible during the Tox run.
basepython = python3.12
setenv =
PYTHONWARNINGS=d
extras = {env:TOX_AP_TEST_EXTRAS:tests}
commands = coverage run -m pytest {posargs}
[testenv:coverage-report]
basepython = python3.12
skip_install = true
deps = coverage[toml]>=5.0.2
commands =
coverage combine
coverage report
[testenv:lint]
basepython = python3.12
skip_install = true
deps =
pre-commit
passenv = HOMEPATH # needed on Windows
commands =
pre-commit run --all-files
[testenv:docs]
# Keep basepython in sync with gh-actions and .readthedocs.yml.
basepython = python3.12
extras = docs
commands =
sphinx-build -n -T -b html -d {envtmpdir}/doctrees doc doc/_build/html
[testenv:pypi-description]
basepython = python3.12
skip_install = true
deps =
twine
pip >= 18.0.0
commands =
pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
[testenv:changelog]
basepython = python3.12
deps =
towncrier
skip_install = true
commands = towncrier --draft
[testenv:typing]
basepython = python3.12
deps =
mypy <= 1.10.1
types-mock
commands =
mypy src/
[flake8]
max-complexity = 15
max-line-length = 100
show-source = True
enable-extensions = M,B,C,T,P
ignore = C812,W503,P103,E1,E2,E3,E5
statistics = True
per-file-ignores =
src/*/__init__.py:F401,F403,F405
src/hamcrest/__init__.py:F401,F403
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。