forked from locustio/locust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
45 lines (41 loc) · 1.21 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[tox]
skipsdist = True
envlist =
ruff
mypy
py{39,310,311,312}
fail_fast_test_main
[testenv]
deps =
mock
retry
pyquery
cryptography
allowlist_externals =
bash
timeout
grep
commands =
python -m pip install .
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'
[testenv:fail_fast_test_main]
commands =
python -m pip install .
python -m unittest -f locust.test.test_main
[testenv:ruff]
deps = ruff==0.3.7
; Pin the same version in the .pre-commit-config.yaml file.
commands =
ruff check .
ruff format --check
[testenv:mypy]
deps =
mypy==1.10.0
types-requests
commands = mypy locust/