【发布时间】:2023-03-24 15:37:01
【问题描述】:
我有一套小型测试总共需要大约 40 秒才能运行,而我有一套中型测试总共需要大约 40 分钟才能运行。
我希望订单运行如下:
- py27 小测试
- py37 小测试
- py27 中等测试
- py37 中等测试
相反,tox 像运行它一样
- py27 小测试
- py27 中等测试
- py37 小测试
- py37 中等测试
这样的问题是,如果一些简单的事情破坏了一个小测试,我想立即知道它。中等测试(如集成测试)是额外的安全层,可以排除更多问题,但需要更长的时间才能完成。
[tox]
envlist = py27,py37
[testenv:py27]
deps =
pytest
pytest-cov
pytest-mock
pylint
; packages specified by the setup.py cover the other dependencies for py2.7
commands =
pytest -v --ignore-glob="*medium*" --doctest-modules
pytest -v tests/medium_tests
【问题讨论】:
标签: python testing continuous-integration automated-tests tox