taraqueue 0.3.0__tar.gz → 0.4.0__tar.gz
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.
- {taraqueue-0.3.0 → taraqueue-0.4.0}/CHANGES.rst +7 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/PKG-INFO +1 -1
- {taraqueue-0.3.0 → taraqueue-0.4.0}/compose.yml +1 -1
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/queue.py +2 -2
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/services.py +15 -26
- taraqueue-0.4.0/tests/test_redis.py +6 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.editorconfig +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.gitattributes +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/CODEOWNERS +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/actions/setup-uv-env/action.yml +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/renovate.json +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/workflows/publish.yml +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/workflows/renovate.yaml +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.github/workflows/test.yml +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.gitignore +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.vscode/extensions.json +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.vscode/launch.json +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/.vscode/settings.json +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/CONTRIBUTING.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/LICENSE.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/Makefile +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/README.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/STYLE_GUIDE.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/changes.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/conf.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/contributing.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/index.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/license.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/modules.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/style_guide.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/taraqueue.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/docs/taraqueue.testing.rst +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/pyproject.toml +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/__init__.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/memory.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/redis.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/registry.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/__init__.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/taraqueue/testing/compose.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/tests/test_compose.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/tests/test_queue.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/tests/test_registry.py +0 -0
- {taraqueue-0.3.0 → taraqueue-0.4.0}/uv.lock +0 -0
|
@@ -14,13 +14,13 @@ def memory_queue():
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
@pytest.fixture
|
|
17
|
-
def redis_queue(redis_service,
|
|
17
|
+
def redis_queue(redis_service, taraqueue_env_vars):
|
|
18
18
|
"""Redis queue fixture."""
|
|
19
19
|
url = URL.build(
|
|
20
20
|
scheme="redis",
|
|
21
21
|
host=redis_service.ip,
|
|
22
22
|
port=6379,
|
|
23
|
-
password=
|
|
23
|
+
password=taraqueue_env_vars["REDIS_PASSWORD"],
|
|
24
24
|
)
|
|
25
25
|
return Queue.from_url(url)
|
|
26
26
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"""Service fixtures."""
|
|
2
2
|
|
|
3
|
-
from functools import partial
|
|
4
3
|
from pathlib import Path
|
|
5
4
|
|
|
6
5
|
import pytest
|
|
@@ -9,35 +8,31 @@ from taraqueue.testing.compose import ComposeServer
|
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
@pytest.fixture(scope="session")
|
|
12
|
-
def
|
|
13
|
-
return "test"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@pytest.fixture(scope="session")
|
|
17
|
-
def env_vars(project):
|
|
11
|
+
def taraqueue_env_vars():
|
|
18
12
|
"""Environment variables for the services."""
|
|
19
13
|
return {
|
|
20
|
-
"COMPOSE_PROJECT_NAME":
|
|
14
|
+
"COMPOSE_PROJECT_NAME": "test",
|
|
21
15
|
"REDIS_PASSWORD": "test",
|
|
22
16
|
}
|
|
23
17
|
|
|
24
18
|
|
|
25
19
|
@pytest.fixture(scope="session")
|
|
26
|
-
def
|
|
27
|
-
"""Environment file containing `
|
|
20
|
+
def taraqueue_env_file(taraqueue_env_vars, request):
|
|
21
|
+
"""Environment file containing `taraqueue_env_vars`.
|
|
28
22
|
|
|
29
23
|
Cached for troubleshooting purposes.
|
|
30
24
|
"""
|
|
31
25
|
env_file = request.config.cache.makedir("compose") / "env"
|
|
32
26
|
with env_file.open("w") as f:
|
|
33
|
-
for k, v in
|
|
27
|
+
for k, v in taraqueue_env_vars.items():
|
|
34
28
|
f.write(f"{k}={v}\n")
|
|
35
29
|
|
|
36
30
|
return env_file
|
|
37
31
|
|
|
38
32
|
|
|
39
33
|
@pytest.fixture(scope="session")
|
|
40
|
-
def
|
|
34
|
+
def taraqueue_compose_files(request):
|
|
35
|
+
"""Use the compose files from the project - not this library."""
|
|
41
36
|
directory = Path(request.config.rootdir)
|
|
42
37
|
filenames = ["docker-compose.yml", "compose.yaml", "compose.yml"]
|
|
43
38
|
while True:
|
|
@@ -55,26 +50,20 @@ def compose_files(request):
|
|
|
55
50
|
|
|
56
51
|
|
|
57
52
|
@pytest.fixture(scope="session")
|
|
58
|
-
def
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
env_file=
|
|
63
|
-
compose_files=
|
|
53
|
+
def redis_service(process, taraqueue_env_file, taraqueue_compose_files):
|
|
54
|
+
"""Redis service fixture."""
|
|
55
|
+
server = ComposeServer(
|
|
56
|
+
pattern="Ready to accept connections tcp",
|
|
57
|
+
env_file=taraqueue_env_file,
|
|
58
|
+
compose_files=taraqueue_compose_files,
|
|
64
59
|
process=process,
|
|
65
60
|
)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
@pytest.fixture(scope="session")
|
|
69
|
-
def redis_service(compose_server):
|
|
70
|
-
"""Redis service fixture."""
|
|
71
|
-
server = compose_server("Ready to accept connections tcp")
|
|
72
61
|
with server.run("redis") as service:
|
|
73
62
|
yield service
|
|
74
63
|
|
|
75
64
|
|
|
76
65
|
@pytest.fixture(scope="session")
|
|
77
|
-
def redis_client(redis_service,
|
|
66
|
+
def redis_client(redis_service, taraqueue_env_vars):
|
|
78
67
|
"""Redis client to the service fixture."""
|
|
79
68
|
from redis import StrictRedis
|
|
80
69
|
|
|
@@ -83,5 +72,5 @@ def redis_client(redis_service, env_vars):
|
|
|
83
72
|
port=6379,
|
|
84
73
|
decode_responses=True,
|
|
85
74
|
db=0,
|
|
86
|
-
password=
|
|
75
|
+
password=taraqueue_env_vars["REDIS_PASSWORD"],
|
|
87
76
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|