Skip to content

Commit 4e2a726

Browse files
authored
Added "SubTests" annotation (#233)
1 parent a2fd6cc commit 4e2a726

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

docs/userguide/examples/range.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ to include all the workers, and then run a simple test case to verify the cluste
164164
yield cluster
165165
cluster.teardown()
166166
167-
def test_worker_cluster_with_fixed_list(self, celery_setup: CeleryTestSetup, subtests):
167+
def test_worker_cluster_with_fixed_list(self, celery_setup: CeleryTestSetup, subtests: SubTests):
168168
worker: CeleryTestWorker
169169
for version, worker in zip(versions_list, celery_setup.worker_cluster):
170170
with subtests.test(msg=f"Found worker {version} in cluster"):
@@ -179,7 +179,7 @@ to include all the workers, and then run a simple test case to verify the cluste
179179
yield cluster
180180
cluster.teardown()
181181
182-
def test_worker_cluster_with_versions_range(self, celery_setup: CeleryTestSetup, subtests):
182+
def test_worker_cluster_with_versions_range(self, celery_setup: CeleryTestSetup, subtests: SubTests):
183183
worker: CeleryTestWorker
184184
for version, worker in zip(versions_range, celery_setup.worker_cluster):
185185
with subtests.test(msg=f"Found worker v{version} in cluster"):

examples/range/tests/test_range_cluster.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pytest_docker_tools import build
33
from pytest_docker_tools import container
44
from pytest_docker_tools import fxtr
5+
from pytest_subtests import SubTests
56

67
from pytest_celery import DEFAULT_WORKER_CONTAINER_TIMEOUT
78
from pytest_celery import DEFAULT_WORKER_VOLUME
@@ -51,7 +52,7 @@ def celery_worker_cluster(self, request: pytest.FixtureRequest) -> CeleryWorkerC
5152
yield cluster
5253
cluster.teardown()
5354

54-
def test_worker_cluster_with_fixed_list(self, celery_setup: CeleryTestSetup, subtests):
55+
def test_worker_cluster_with_fixed_list(self, celery_setup: CeleryTestSetup, subtests: SubTests):
5556
worker: CeleryTestWorker
5657
for version, worker in zip(versions_list, celery_setup.worker_cluster):
5758
with subtests.test(msg=f"Found worker {version} in cluster"):
@@ -66,7 +67,7 @@ def celery_worker_cluster(self, request: pytest.FixtureRequest) -> CeleryWorkerC
6667
yield cluster
6768
cluster.teardown()
6869

69-
def test_worker_cluster_with_versions_range(self, celery_setup: CeleryTestSetup, subtests):
70+
def test_worker_cluster_with_versions_range(self, celery_setup: CeleryTestSetup, subtests: SubTests):
7071
worker: CeleryTestWorker
7172
for version, worker in zip(versions_range, celery_setup.worker_cluster):
7273
with subtests.test(msg=f"Found worker v{version} in cluster"):

poetry.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ coverage = ">=7.4.2"
123123
pytest-sugar = { version = ">=1.0.0", python = ">=3.8,<4.0" }
124124
pytest-cov = ">=4.0.0"
125125
pytest-xdist = ">=3.1.0"
126-
pytest-subtests = ">=0.11.0"
126+
pytest-subtests = ">=0.12.1"
127127
pytest-rerunfailures = ">=13.0.0"
128128

129129
[tool.poetry.group.ci]

0 commit comments

Comments
 (0)