是否可以使用单个tox虚拟环境执行以下操作?你知道吗
[tox]
envlist = test, pylint, flake8, mypy
skipsdist = true
[testenv:lint]
deps = pylint
commands = pylint .
[testenv:flake8]
deps = flake8
commands = flake8 .
[testenv:mypy]
commands = mypy . --strict
[testenv:test]
deps = pytest
commands = pytest
由于我只在python版本(py3.7)上进行测试,我不希望tox必须创建4个环境(.tox/test
、.tox/pylint
、.tox/flake8
、.tox/mypy
),因为它们都可以在单个环境上运行。你知道吗
我还想看看哪些失败了,因此不想做:
[tox]
skipsdist = true
[testenv]
commands = pylint .
flake8 .
mypy . --strict
pytest
因为输出是这样的:
_____________ summary ___________
ERROR: python: commands failed
不是这样的:
____________________summary _________________
ERROR: test: commands failed
ERROR: lint: commands failed
ERROR: mypy: commands failed
test: commands succeeded
tox
在第一个失败的命令处停止。因此,我的建议是将命令从fasterst排序为slowest,并允许tox
执行其余的操作:相关问题 更多 >
编程相关推荐