locust 2.32.9.dev10__tar.gz → 2.32.10.dev1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- locust-2.32.10.dev1/.gitignore +33 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/PKG-INFO +26 -31
- locust-2.32.10.dev1/hatch_build.py +20 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/_version.py +2 -6
- locust-2.32.10.dev1/pyproject.toml +278 -0
- locust-2.32.9.dev10/poetry.lock +0 -2534
- locust-2.32.9.dev10/pyproject.toml +0 -224
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/LICENSE +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/README.md +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/__init__.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/__main__.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/argument_parser.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/clients.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/contrib/__init__.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/contrib/fasthttp.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/contrib/mongodb.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/contrib/postgres.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/debug.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/dispatch.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/env.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/event.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/exception.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/html.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/input_events.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/log.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/main.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/py.typed +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/rpc/__init__.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/rpc/protocol.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/rpc/zmqrpc.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/runners.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/shape.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/stats.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/user/__init__.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/user/inspectuser.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/user/sequential_taskset.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/user/task.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/user/users.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/user/wait_time.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/__init__.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/cache.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/date.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/deprecation.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/directory.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/exception_handler.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/load_locustfile.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/rounding.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/timespan.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/util/url.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/web.py +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/assets/favicon-dark.png +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/assets/favicon-light.png +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/assets/graphs-dark.png +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/assets/graphs-light.png +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/assets/index-DnScW665.js +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/assets/testruns-dark.png +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/assets/testruns-light.png +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/auth.html +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/index.html +0 -0
- {locust-2.32.9.dev10 → locust-2.32.10.dev1}/locust/webui/dist/report.html +0 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
*.pyc
|
2
|
+
locust.wpr
|
3
|
+
locust.egg-info/**
|
4
|
+
locustio.egg-info/**
|
5
|
+
locust/_version.py
|
6
|
+
locust/test/mock_*.py
|
7
|
+
docs/_build/**
|
8
|
+
docs/cli-help-output.txt
|
9
|
+
docs/config-options.rst
|
10
|
+
mock.*.egg
|
11
|
+
web_test_*.csv
|
12
|
+
err.txt
|
13
|
+
out.txt
|
14
|
+
.eggs/
|
15
|
+
dist/**
|
16
|
+
.idea/**
|
17
|
+
*.iml
|
18
|
+
*.ipr
|
19
|
+
.vagrant
|
20
|
+
build/
|
21
|
+
.coverage
|
22
|
+
docs/env-options.rst
|
23
|
+
.editorconfig
|
24
|
+
__pycache__
|
25
|
+
.pytest_cache
|
26
|
+
.sass-cache/
|
27
|
+
.env
|
28
|
+
yarn-error.log
|
29
|
+
.venv
|
30
|
+
.DS_Store
|
31
|
+
.python-version
|
32
|
+
locust/webui/dist/**
|
33
|
+
.coverage*
|
@@ -1,12 +1,14 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: locust
|
3
|
-
Version: 2.32.
|
3
|
+
Version: 2.32.10.dev1
|
4
4
|
Summary: Developer-friendly load testing framework
|
5
|
-
|
5
|
+
Project-URL: homepage, https://locust.io/
|
6
|
+
Project-URL: repository, https://github.com/locustio/locust
|
7
|
+
Project-URL: documentation, https://docs.locust.io/
|
8
|
+
Author: Jonatan Heyman, Lars Holmberg
|
9
|
+
Maintainer: Lars Holmberg, Jonatan Heyman, Andrew Baldwin
|
6
10
|
License: MIT
|
7
|
-
|
8
|
-
Maintainer: Lars Holmberg
|
9
|
-
Requires-Python: >=3.9
|
11
|
+
License-File: LICENSE
|
10
12
|
Classifier: Development Status :: 5 - Production/Stable
|
11
13
|
Classifier: Intended Audience :: Developers
|
12
14
|
Classifier: Intended Audience :: System Administrators
|
@@ -22,30 +24,24 @@ Classifier: Programming Language :: Python :: 3.13
|
|
22
24
|
Classifier: Topic :: Software Development :: Testing
|
23
25
|
Classifier: Topic :: Software Development :: Testing :: Traffic Generation
|
24
26
|
Classifier: Topic :: System :: Distributed Computing
|
25
|
-
Requires-
|
26
|
-
Requires-Dist:
|
27
|
-
Requires-Dist:
|
28
|
-
Requires-Dist:
|
29
|
-
Requires-Dist: flask
|
30
|
-
Requires-Dist: gevent
|
31
|
-
Requires-Dist: gevent
|
32
|
-
Requires-Dist: geventhttpclient
|
33
|
-
Requires-Dist: msgpack
|
34
|
-
Requires-Dist: psutil
|
35
|
-
Requires-Dist: pywin32
|
36
|
-
Requires-Dist: pyzmq
|
37
|
-
Requires-Dist: requests
|
38
|
-
Requires-Dist: requests
|
39
|
-
Requires-Dist: setuptools
|
40
|
-
Requires-Dist: tomli
|
41
|
-
Requires-Dist:
|
42
|
-
|
43
|
-
Project-URL: Help/Questions, https://github.com/orgs/locustio/discussions/
|
44
|
-
Project-URL: Issue Tracker, https://github.com/locustio/locust/issues
|
45
|
-
Project-URL: Repository, https://github.com/locustio/locust
|
46
|
-
Project-URL: Stack Overflow, https://stackoverflow.com/questions/tagged/locust
|
47
|
-
Project-URL: Slack, https://locustio.slack.com/
|
48
|
-
Project-URL: Slack/Signup, https://communityinviter.com/apps/locustio/locust
|
27
|
+
Requires-Python: >=3.9
|
28
|
+
Requires-Dist: configargparse>=1.5.5
|
29
|
+
Requires-Dist: flask-cors>=3.0.10
|
30
|
+
Requires-Dist: flask-login>=0.6.3
|
31
|
+
Requires-Dist: flask>=2.0.0
|
32
|
+
Requires-Dist: gevent>=22.10.2; python_version <= '3.12'
|
33
|
+
Requires-Dist: gevent>=24.10.1; python_version > '3.13'
|
34
|
+
Requires-Dist: geventhttpclient>=2.3.1
|
35
|
+
Requires-Dist: msgpack>=1.0.0
|
36
|
+
Requires-Dist: psutil>=5.9.1
|
37
|
+
Requires-Dist: pywin32; sys_platform == 'win32'
|
38
|
+
Requires-Dist: pyzmq>=25.0.0
|
39
|
+
Requires-Dist: requests>=2.26.0; python_version <= '3.11'
|
40
|
+
Requires-Dist: requests>=2.32.2; python_version > '3.11'
|
41
|
+
Requires-Dist: setuptools>=70.0.0
|
42
|
+
Requires-Dist: tomli>=1.1.0; python_version < '3.11'
|
43
|
+
Requires-Dist: typing-extensions>=4.6.0; python_version < '3.11'
|
44
|
+
Requires-Dist: werkzeug>=2.0.0
|
49
45
|
Description-Content-Type: text/markdown
|
50
46
|
|
51
47
|
# Locust
|
@@ -149,4 +145,3 @@ Locust's code base is intentionally kept small and doesn't solve everything out
|
|
149
145
|
## License
|
150
146
|
|
151
147
|
Open source licensed under the MIT license (see _LICENSE_ file for details).
|
152
|
-
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import os
|
2
|
+
import subprocess
|
3
|
+
from typing import Any
|
4
|
+
|
5
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface # type: ignore
|
6
|
+
|
7
|
+
|
8
|
+
class BuildFrontend(BuildHookInterface):
|
9
|
+
def initialize(self, version: str, build_data: dict[str, Any]) -> None:
|
10
|
+
# Only build the front end once, in the source dist, the wheel build just copies it from there
|
11
|
+
if self.target_name == "sdist":
|
12
|
+
if not os.environ.get("SKIP_PRE_BUILD"):
|
13
|
+
print("Building front end...")
|
14
|
+
try:
|
15
|
+
subprocess.check_output("yarn install", cwd="locust/webui", shell=True, stderr=subprocess.STDOUT)
|
16
|
+
subprocess.check_output("yarn build", cwd="locust/webui", shell=True, stderr=subprocess.STDOUT)
|
17
|
+
except subprocess.CalledProcessError as e:
|
18
|
+
raise RuntimeError(f"'{e.cmd}' got exit code {e.returncode}: {e.output}")
|
19
|
+
|
20
|
+
return super().initialize(version, build_data)
|
@@ -3,7 +3,6 @@
|
|
3
3
|
TYPE_CHECKING = False
|
4
4
|
if TYPE_CHECKING:
|
5
5
|
from typing import Tuple, Union
|
6
|
-
|
7
6
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
8
7
|
else:
|
9
8
|
VERSION_TUPLE = object
|
@@ -13,8 +12,5 @@ __version__: str
|
|
13
12
|
__version_tuple__: VERSION_TUPLE
|
14
13
|
version_tuple: VERSION_TUPLE
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
version = __version__
|
19
|
-
__version_tuple__ = (2, 32, 9, "dev10")
|
20
|
-
version_tuple = __version_tuple__
|
15
|
+
__version__ = version = '2.32.10.dev1'
|
16
|
+
__version_tuple__ = version_tuple = (2, 32, 10, 'dev1')
|
@@ -0,0 +1,278 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling", "hatch-vcs"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "locust"
|
7
|
+
description = "Developer-friendly load testing framework"
|
8
|
+
license = { text = "MIT" }
|
9
|
+
dynamic = ["version"]
|
10
|
+
readme = "README.md"
|
11
|
+
requires-python = ">=3.9"
|
12
|
+
authors = [{ name = "Jonatan Heyman" }, { name = "Lars Holmberg" }]
|
13
|
+
maintainers = [
|
14
|
+
{ name = "Lars Holmberg" },
|
15
|
+
{ name = "Jonatan Heyman" },
|
16
|
+
{ name = "Andrew Baldwin" },
|
17
|
+
]
|
18
|
+
|
19
|
+
classifiers = [
|
20
|
+
"Topic :: Software Development :: Testing :: Traffic Generation",
|
21
|
+
"Development Status :: 5 - Production/Stable",
|
22
|
+
"License :: OSI Approved :: MIT License",
|
23
|
+
"Operating System :: OS Independent",
|
24
|
+
"Programming Language :: Python",
|
25
|
+
"Programming Language :: Python :: 3",
|
26
|
+
"Programming Language :: Python :: 3.9",
|
27
|
+
"Programming Language :: Python :: 3.10",
|
28
|
+
"Programming Language :: Python :: 3.11",
|
29
|
+
"Programming Language :: Python :: 3.12",
|
30
|
+
"Programming Language :: Python :: 3.13",
|
31
|
+
"Intended Audience :: Developers",
|
32
|
+
"Intended Audience :: System Administrators",
|
33
|
+
"Topic :: Software Development :: Testing",
|
34
|
+
"Topic :: Software Development :: Testing :: Traffic Generation",
|
35
|
+
"Topic :: System :: Distributed Computing",
|
36
|
+
]
|
37
|
+
|
38
|
+
dependencies = [
|
39
|
+
"gevent>=22.10.2; python_version <= '3.12'",
|
40
|
+
"gevent>=24.10.1; python_version > '3.13'",
|
41
|
+
"flask>=2.0.0",
|
42
|
+
"Werkzeug>=2.0.0",
|
43
|
+
"requests>=2.26.0; python_version <= '3.11'",
|
44
|
+
"requests>=2.32.2; python_version > '3.11'",
|
45
|
+
"msgpack>=1.0.0",
|
46
|
+
"pyzmq>=25.0.0",
|
47
|
+
"geventhttpclient>=2.3.1",
|
48
|
+
"ConfigArgParse>=1.5.5",
|
49
|
+
"tomli>=1.1.0; python_version < '3.11'",
|
50
|
+
"typing_extensions>=4.6.0; python_version < '3.11'",
|
51
|
+
"psutil>=5.9.1",
|
52
|
+
"Flask-Login>=0.6.3",
|
53
|
+
"Flask-Cors>=3.0.10",
|
54
|
+
"pywin32; sys_platform == 'win32'",
|
55
|
+
"setuptools>=70.0.0",
|
56
|
+
]
|
57
|
+
|
58
|
+
[project.urls]
|
59
|
+
homepage = "https://locust.io/"
|
60
|
+
repository = "https://github.com/locustio/locust"
|
61
|
+
documentation = "https://docs.locust.io/"
|
62
|
+
|
63
|
+
[tool.uv]
|
64
|
+
default-groups = ["build", "test", "lint"]
|
65
|
+
|
66
|
+
[dependency-groups]
|
67
|
+
build = ["hatch>=1.14.0", "hatch-vcs>=0.4.0"]
|
68
|
+
test = [
|
69
|
+
"cryptography>=43.0.1,<44.0.0",
|
70
|
+
"mock>=5.1.0,<6.0.0",
|
71
|
+
"pyquery>=2.0.0,<3.0.0",
|
72
|
+
"pytest>=8.3.3,<9.0.0",
|
73
|
+
"retry>=0.9.2,<1.0.0",
|
74
|
+
]
|
75
|
+
lint = [
|
76
|
+
"pre-commit>=3.7.1,<4.0.0",
|
77
|
+
"ruff==0.7.3",
|
78
|
+
"mypy>=1.13.0,<2.0.0",
|
79
|
+
"types-requests>=2.32.0.20240622,<3.0.0",
|
80
|
+
]
|
81
|
+
release = ["twine>=5.1.1,<6.0.0"]
|
82
|
+
docs = [
|
83
|
+
"sphinx==7.3.7",
|
84
|
+
"sphinx-rtd-theme==2.0.0",
|
85
|
+
"readthedocs-sphinx-search==0.3.2",
|
86
|
+
"Sphinx-Substitution-Extensions==2020.9.30.0",
|
87
|
+
"Pygments==2.16.1",
|
88
|
+
"alabaster==0.7.16",
|
89
|
+
"babel==2.13.0",
|
90
|
+
"docutils==0.18.1",
|
91
|
+
"imagesize==1.4.1",
|
92
|
+
"snowballstemmer==2.2.0",
|
93
|
+
"sphinx-prompt==1.5.0",
|
94
|
+
"sphinxcontrib-applehelp==1.0.4",
|
95
|
+
"sphinxcontrib-devhelp==1.0.2",
|
96
|
+
"sphinxcontrib-htmlhelp==2.0.1",
|
97
|
+
"sphinxcontrib-jsmath==1.0.1",
|
98
|
+
"sphinxcontrib-qthelp==1.0.3",
|
99
|
+
"sphinxcontrib-serializinghtml==1.1.10",
|
100
|
+
"sphinxcontrib-googleanalytics>=0.4",
|
101
|
+
]
|
102
|
+
|
103
|
+
[project.scripts]
|
104
|
+
locust = "locust.main:main"
|
105
|
+
|
106
|
+
[tool.hatch.version]
|
107
|
+
source = "vcs"
|
108
|
+
|
109
|
+
[tool.hatch.build.hooks.vcs]
|
110
|
+
version-file = "locust/_version.py"
|
111
|
+
|
112
|
+
[tool.hatch.build]
|
113
|
+
packages = ["locust"]
|
114
|
+
|
115
|
+
[tool.hatch.build.targets.sdist]
|
116
|
+
artifacts = ["locust/webui/dist"]
|
117
|
+
exclude = ["locust/webui/*", "locust/test", "locust/build"]
|
118
|
+
|
119
|
+
[tool.hatch.build.targets.wheel]
|
120
|
+
artifacts = ["locust/webui/dist"]
|
121
|
+
|
122
|
+
[tool.hatch.version.raw-options]
|
123
|
+
local_scheme = "no-local-version"
|
124
|
+
|
125
|
+
[tool.hatch.build.hooks.custom]
|
126
|
+
[tool.hatch.build.targets.BuildFrontend.hooks.custom]
|
127
|
+
|
128
|
+
[tool.ruff]
|
129
|
+
target-version = "py39"
|
130
|
+
line-length = 120
|
131
|
+
extend-exclude = [
|
132
|
+
"build",
|
133
|
+
"examples/issue_*.py",
|
134
|
+
"src/readthedocs-sphinx-search/",
|
135
|
+
]
|
136
|
+
lint.ignore = ["E402", "E501", "E713", "E731", "E741"]
|
137
|
+
lint.select = ["E", "F", "W", "UP", "FA102", "I001"]
|
138
|
+
|
139
|
+
[tool.ruff.lint.per-file-ignores]
|
140
|
+
"examples/*" = ["F841"]
|
141
|
+
|
142
|
+
[tool.ruff.lint.isort]
|
143
|
+
section-order = [
|
144
|
+
"future",
|
145
|
+
"locust",
|
146
|
+
"standard-library",
|
147
|
+
"third-party",
|
148
|
+
"first-party",
|
149
|
+
"local-folder",
|
150
|
+
]
|
151
|
+
# Custom selection-order: to ensure locust is imported as first in locustfiles (for successful gevent monkey patching)
|
152
|
+
|
153
|
+
[tool.ruff.lint.isort.sections]
|
154
|
+
locust = ["locust"]
|
155
|
+
|
156
|
+
[tool.mypy]
|
157
|
+
# missing type stubs
|
158
|
+
ignore_missing_imports = true
|
159
|
+
python_version = "3.9"
|
160
|
+
|
161
|
+
[tool.pyright]
|
162
|
+
exclude = ["locust/test"]
|
163
|
+
reportOptionalMemberAccess = "none"
|
164
|
+
analyzeUnannotatedFunctions = false
|
165
|
+
|
166
|
+
|
167
|
+
# Hatch environments
|
168
|
+
|
169
|
+
# List environments using `hatch env show`
|
170
|
+
# https://hatch.pypa.io/1.13/tutorials/environment/basic-usage/
|
171
|
+
|
172
|
+
## Local Testing
|
173
|
+
|
174
|
+
# Default hatch environment, used during local development
|
175
|
+
# List tests using `hatch test -s`
|
176
|
+
# https://hatch.pypa.io/1.13/tutorials/testing/overview/
|
177
|
+
[tool.hatch.envs.hatch-test]
|
178
|
+
default-args = ["locust/test"]
|
179
|
+
dependencies = [
|
180
|
+
"cryptography>=43.0.1,<44.0.0",
|
181
|
+
"mock>=5.1.0,<6.0.0",
|
182
|
+
"pyquery>=2.0.0,<3.0.0",
|
183
|
+
"pytest>=8.3.3,<9.0.0",
|
184
|
+
"retry>=0.9.2,<1.0.0",
|
185
|
+
]
|
186
|
+
|
187
|
+
[tool.hatch.envs.hatch-test.scripts]
|
188
|
+
run = [
|
189
|
+
"pytest{env:HATCH_TEST_ARGS:} {args}",
|
190
|
+
"bash -ec 'PYTHONUNBUFFERED=1 python3 examples/debugging_advanced.py | grep done'",
|
191
|
+
]
|
192
|
+
|
193
|
+
## CI testing
|
194
|
+
|
195
|
+
# Run all combinations: `hatch run test:all`
|
196
|
+
# Run single env: `hatch run +py=3.10 test:all`
|
197
|
+
|
198
|
+
[tool.hatch.envs.test]
|
199
|
+
template = "hatch-test"
|
200
|
+
|
201
|
+
[[tool.hatch.envs.test.matrix]]
|
202
|
+
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
203
|
+
|
204
|
+
|
205
|
+
## Run all unit tests and advanced debugging
|
206
|
+
[tool.hatch.envs.test.scripts]
|
207
|
+
# Disable these tests for now, because they are breaking. When someone has time they should be converted into regular unit tests
|
208
|
+
# bash -ec "PYTHONUNBUFFERED=1 timeout 20s python3 examples/rest.py >{temp_dir}/out.txt 2>/{temp_dir}/err.txt || true"
|
209
|
+
# grep -qm 1 'my custom error message with response text, response was {"args"' {temp_dir}/out.txt
|
210
|
+
# grep -qm 1 'ZeroDivisionError: division by zero at.*Response was {"ar' {temp_dir}/out.txt
|
211
|
+
# bash -ec '! grep . {temp_dir}/err.txt' # should be empty
|
212
|
+
all = [
|
213
|
+
"pytest {args:locust/test}",
|
214
|
+
"bash -ec 'PYTHONUNBUFFERED=1 python3 examples/debugging_advanced.py | grep done'",
|
215
|
+
]
|
216
|
+
|
217
|
+
# Run main test and bail on first error
|
218
|
+
fail_fast = "pytest -x {args:locust/test/test_main.py}"
|
219
|
+
|
220
|
+
|
221
|
+
## CI integration testing
|
222
|
+
|
223
|
+
## Integration testing of build packages on CI, using a pre-built package
|
224
|
+
[tool.hatch.envs.integration_test_ci]
|
225
|
+
template = "test"
|
226
|
+
skip-install = true
|
227
|
+
path = ".venv"
|
228
|
+
|
229
|
+
[[tool.hatch.envs.integration_test_ci.matrix]]
|
230
|
+
python = ["3.12"]
|
231
|
+
|
232
|
+
|
233
|
+
## Linting
|
234
|
+
[tool.hatch.envs.lint]
|
235
|
+
detached = true
|
236
|
+
dependencies = [
|
237
|
+
"ruff==0.7.3",
|
238
|
+
"mypy>=1.13.0,<2.0.0",
|
239
|
+
"types-requests>=2.32.0.20240622,<3.0.0",
|
240
|
+
]
|
241
|
+
|
242
|
+
[[tool.hatch.envs.lint.matrix]]
|
243
|
+
python = ["3.12"]
|
244
|
+
|
245
|
+
[tool.hatch.envs.lint.scripts]
|
246
|
+
all = [""]
|
247
|
+
types = ["mypy locust/"]
|
248
|
+
format = ["ruff check .", "ruff format --check"]
|
249
|
+
|
250
|
+
|
251
|
+
## Hatch docs building environment
|
252
|
+
[tool.hatch.envs.docs]
|
253
|
+
dependencies = [
|
254
|
+
"sphinx==7.3.7",
|
255
|
+
"sphinx-rtd-theme==2.0.0",
|
256
|
+
"readthedocs-sphinx-search==0.3.2",
|
257
|
+
"Sphinx-Substitution-Extensions==2020.9.30.0",
|
258
|
+
"Pygments==2.16.1",
|
259
|
+
"alabaster==0.7.16",
|
260
|
+
"babel==2.13.0",
|
261
|
+
"docutils==0.18.1",
|
262
|
+
"imagesize==1.4.1",
|
263
|
+
"snowballstemmer==2.2.0",
|
264
|
+
"sphinx-prompt==1.5.0",
|
265
|
+
"sphinxcontrib-applehelp==1.0.4",
|
266
|
+
"sphinxcontrib-devhelp==1.0.2",
|
267
|
+
"sphinxcontrib-htmlhelp==2.0.1",
|
268
|
+
"sphinxcontrib-jsmath==1.0.1",
|
269
|
+
"sphinxcontrib-qthelp==1.0.3",
|
270
|
+
"sphinxcontrib-serializinghtml==1.1.10",
|
271
|
+
"sphinxcontrib-googleanalytics>=0.4",
|
272
|
+
]
|
273
|
+
|
274
|
+
[[tool.hatch.envs.docs.matrix]]
|
275
|
+
python = ["3.12"]
|
276
|
+
|
277
|
+
[tool.hatch.envs.docs.scripts]
|
278
|
+
build = ["sphinx-build -b html docs/ docs/_build/"]
|