mirror of https://github.com/locustio/locust.git
60 lines
1.8 KiB
INI
60 lines
1.8 KiB
INI
[tox]
|
|
envlist =
|
|
ruff
|
|
mypy
|
|
py{39,310,311,312,313}
|
|
fail_fast_test_main
|
|
|
|
[testenv]
|
|
package = skip
|
|
allowlist_externals =
|
|
bash
|
|
grep
|
|
poetry
|
|
timeout
|
|
ruff
|
|
mypy
|
|
sphinx-build
|
|
commands_pre =
|
|
# Ensures test dependencies are available to derivative envs
|
|
poetry install --no-interaction --no-root --with test --no-plugins
|
|
commands =
|
|
python -m unittest discover []
|
|
; Disable these tests for now, because they are breaking. When someone has time they should be converted into regular unit tests
|
|
; bash -ec "PYTHONUNBUFFERED=1 timeout 20s python3 examples/rest.py >{temp_dir}/out.txt 2>/{temp_dir}/err.txt || true"
|
|
; grep -qm 1 'my custom error message with response text, response was {"args"' {temp_dir}/out.txt
|
|
; grep -qm 1 'ZeroDivisionError: division by zero at.*Response was {"ar' {temp_dir}/out.txt
|
|
; bash -ec '! grep . {temp_dir}/err.txt' # should be empty
|
|
bash -ec 'PYTHONUNBUFFERED=1 python3 examples/debugging_advanced.py | grep done'
|
|
|
|
; Used for running integration tests on an externally built dist (CI)
|
|
[testenv:fail_fast_test_main_external_package]
|
|
package = external
|
|
package_glob = {toxinidir}{/}dist{/}*.whl
|
|
commands =
|
|
python -m unittest -f locust.test.test_main
|
|
|
|
; Used for running integration tests on a locally installed editable package on any OS
|
|
[testenv:fail_fast_test_main]
|
|
commands_pre =
|
|
poetry install --no-interaction --no-root --with test --no-plugins
|
|
python pre_build.py
|
|
pip install .
|
|
commands =
|
|
python -m unittest -f locust.test.test_main
|
|
|
|
[testenv:ruff]
|
|
commands =
|
|
ruff check .
|
|
ruff format --check
|
|
|
|
[testenv:mypy]
|
|
commands =
|
|
mypy locust/
|
|
|
|
[testenv:docs]
|
|
commands_pre =
|
|
poetry install --no-interaction --no-root --only docs --no-plugins
|
|
commands =
|
|
sphinx-build -b html docs/ docs/_build/
|