locust 2.22.1.dev33__py3-none-any.whl → 2.22.1.dev38__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- locust/_version.py +2 -2
- locust/test/test_load_locustfile.py +10 -0
- locust/util/load_locustfile.py +2 -0
- locust/webui/dist/assets/auth-e7925d10.js.map +1 -0
- locust/webui/dist/assets/{index-f31faefc.js → index-dc1c0e5b.js} +54 -54
- locust/webui/dist/assets/{index-f31faefc.js.map → index-dc1c0e5b.js.map} +1 -1
- locust/webui/dist/auth.html +1 -1
- locust/webui/dist/index.html +1 -1
- {locust-2.22.1.dev33.dist-info → locust-2.22.1.dev38.dist-info}/METADATA +1 -1
- {locust-2.22.1.dev33.dist-info → locust-2.22.1.dev38.dist-info}/RECORD +14 -14
- locust/webui/dist/assets/auth-b54b80c4.js.map +0 -1
- {locust-2.22.1.dev33.dist-info → locust-2.22.1.dev38.dist-info}/LICENSE +0 -0
- {locust-2.22.1.dev33.dist-info → locust-2.22.1.dev38.dist-info}/WHEEL +0 -0
- {locust-2.22.1.dev33.dist-info → locust-2.22.1.dev38.dist-info}/entry_points.txt +0 -0
- {locust-2.22.1.dev33.dist-info → locust-2.22.1.dev38.dist-info}/top_level.txt +0 -0
locust/_version.py
CHANGED
@@ -12,5 +12,5 @@ __version__: str
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
13
13
|
version_tuple: VERSION_TUPLE
|
14
14
|
|
15
|
-
__version__ = version = '2.22.1.
|
16
|
-
__version_tuple__ = version_tuple = (2, 22, 1, '
|
15
|
+
__version__ = version = '2.22.1.dev38'
|
16
|
+
__version_tuple__ = version_tuple = (2, 22, 1, 'dev38')
|
@@ -50,6 +50,16 @@ class TestLoadLocustfile(LocustTestCase):
|
|
50
50
|
os.path.join(os.path.relpath(mocked.directory, os.getcwd()), mocked.filename)
|
51
51
|
)
|
52
52
|
|
53
|
+
def test_load_locust_file_called_locust_dot_py(self):
|
54
|
+
with mock_locustfile() as mocked:
|
55
|
+
new_filename = mocked.file_path.replace(mocked.filename, "locust.py")
|
56
|
+
os.rename(mocked.file_path, new_filename)
|
57
|
+
try:
|
58
|
+
docstring, user_classes, shape_classes = main.load_locustfile(new_filename)
|
59
|
+
finally:
|
60
|
+
# move it back, so it can be deleted
|
61
|
+
os.rename(new_filename, mocked.file_path)
|
62
|
+
|
53
63
|
def test_load_locust_file_with_a_dot_in_filename(self):
|
54
64
|
with mock_locustfile(filename_prefix="mocked.locust.file") as mocked:
|
55
65
|
docstring, user_classes, shape_classes = main.load_locustfile(mocked.file_path)
|
locust/util/load_locustfile.py
CHANGED
@@ -57,6 +57,8 @@ def load_locustfile(path) -> tuple[str | None, dict[str, User], list[LoadTestSha
|
|
57
57
|
|
58
58
|
# Perform the import
|
59
59
|
module_name = os.path.splitext(locustfile)[0]
|
60
|
+
if module_name == "locust":
|
61
|
+
module_name = "locustfile" # Avoid conflict with locust package
|
60
62
|
loader = importlib.machinery.SourceFileLoader(module_name, path)
|
61
63
|
spec = importlib.util.spec_from_file_location(module_name, path, loader=loader)
|
62
64
|
if spec is None:
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"auth-e7925d10.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|