加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tox.ini 2.98 KB
一键复制 编辑 原始数据 按行查看 历史
[tox]
envlist = py36,py37,py38,py39
[pytest]
addopts = --ignore bin --ignore integration_tests/repos --ignore _data/
[testenv]
deps=pytest
commands=
pytest --ignore=integration_tests/ --ignore=_data/
# Use docker environments to test all python versions.
# (This is just slightly more convenient for running tests
# without having to install a bunch of python version ahead
# of time.)
[testenv:docker]
deps =
pytest
allowlist_externals =
docker
commands =
docker run -it -v {toxinidir}:/code/ darglint-35 pytest
docker run -it -v {toxinidir}:/code/ darglint-36 pytest
docker run -it -v {toxinidir}:/code/ darglint-37 pytest
docker run -it -v {toxinidir}:/code/ darglint-38 pytest
docker run -it -v {toxinidir}:/code/ darglint-39 pytest
# Pre-commit tests.
#
# To run,
#
# tox -e pre-commit
#
# These tests expect certain test fixtures to be present. They're not
# included here because they could substantially increase the size of
# the repository, and I don't want to worry about licenses, etc.
#
# The following is a list of files and where they should be sourced:
#
# - _integration_tests/goldens.json_: A set of goldens which should be
# generated by hand, or using the utility in bin/doc_extract. Alternatively,
# they could be generated from darglint and touched up by hand to be
# made more correct.
# - _integration_tests/max_golden.json_: Should contain a very large golden,
# crafted to be difficult to parse.
# - _.performance_testrun_: Automatically generated, contains the history of
# of the performance test runs. Also used as a cache of previous runs
# to prevent pre-commit tests from taking too long.
# - _.performance_module_testrun_: Automatically generated, contains the history
# of the module performance test runs. (Which are run against the repostitories
# described below.)
# - _.performance_history_: Automatially generated, records performance history
# in an easy to view fashion.
# - _integration_tests/repos/_: Cloned whole repos to test against.
# Ideally, these will be quite large, so it doesn't make sense to include them
# in the repository.
#
# TODO: Add flake8 output.
[testenv:pre-commit]
deps=
pytest
flake8
flake8-docstrings
flake8-rst-docstrings
commands =
# E2E tests
pytest integration_tests/end_to_end.py
# Analysis tests
pytest integration_tests/analysis_tests.py
# Test against how we expect docstrings to be parsed.
pytest integration_tests/goldens.py
# Test the performance to make sure we don't introduce
# a severe regression.
pytest integration_tests/performance.py
# Test different source file encodings.
pytest integration_tests/sources.py
# Display the size of the grammar.
python integration_tests/grammar_size.py
# Display the performance statistics.
python integration_tests/performance.py
# Make sure darglint stays compatible with other common plugins.
pytest integration_tests/compatibility.py
# Test that the flake8 plugin gets config from flake8.
pytest integration_tests/test_flake8.py
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化