Skip to content

Commit b8af866

Browse files
chore: add optional dependencies for development and enhance test dependency management
1 parent ecf5ba0 commit b8af866

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ license = { text = "MIT" }
1212
authors = [{ name = "Plane", email = "engineering@plane.so" }]
1313
dependencies = ["requests>=2.31.0", "pydantic>=2.4.0"]
1414

15+
[project.optional-dependencies]
16+
dev = ["pytest", "pytest-dependency"]
17+
1518
[tool.setuptools.packages.find]
1619
where = ["."]
1720
include = ["plane*"]

tests/unit/test_work_item_relations.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def test_list_dependencies_empty(
8787
assert result.finish_before == []
8888
assert result.finish_after == []
8989

90+
@pytest.mark.dependency(name="create_blocking_dep")
9091
def test_create_blocking_dependency(
9192
self,
9293
client: PlaneClient,
@@ -112,6 +113,7 @@ def test_create_blocking_dependency(
112113
assert item.id == work_item_b.id
113114
assert item.relation_type == "blocking"
114115

116+
@pytest.mark.dependency(depends=["create_blocking_dep"])
115117
def test_list_dependencies_after_create(
116118
self,
117119
client: PlaneClient,
@@ -126,6 +128,7 @@ def test_list_dependencies_after_create(
126128
blocking_ids = [wi.id for wi in result.blocking]
127129
assert work_item_b.id in blocking_ids
128130

131+
@pytest.mark.dependency(depends=["create_blocking_dep"])
129132
def test_list_reverse_dependency(
130133
self,
131134
client: PlaneClient,
@@ -139,6 +142,7 @@ def test_list_reverse_dependency(
139142
blocked_by_ids = [wi.id for wi in result.blocked_by]
140143
assert work_item_a.id in blocked_by_ids
141144

145+
@pytest.mark.dependency(depends=["create_blocking_dep"])
142146
def test_remove_dependency(
143147
self,
144148
client: PlaneClient,
@@ -221,6 +225,7 @@ def test_list_custom_relations_empty(
221225
assert result[custom_definition.outward] == []
222226
assert result[custom_definition.inward] == []
223227

228+
@pytest.mark.dependency(name="create_custom_relation_outward")
224229
def test_create_custom_relation_outward(
225230
self,
226231
client: PlaneClient,
@@ -248,6 +253,7 @@ def test_create_custom_relation_outward(
248253
assert item.id == work_item_b.id
249254
assert item.relation_type == custom_definition.outward
250255

256+
@pytest.mark.dependency(depends=["create_custom_relation_outward"])
251257
def test_list_custom_relations_after_create(
252258
self,
253259
client: PlaneClient,
@@ -262,6 +268,7 @@ def test_list_custom_relations_after_create(
262268
outward_ids = [wi.id for wi in result.get(custom_definition.outward, [])]
263269
assert work_item_b.id in outward_ids
264270

271+
@pytest.mark.dependency(depends=["create_custom_relation_outward"])
265272
def test_list_custom_relations_inward_side(
266273
self,
267274
client: PlaneClient,
@@ -276,6 +283,7 @@ def test_list_custom_relations_inward_side(
276283
inward_ids = [wi.id for wi in result.get(custom_definition.inward, [])]
277284
assert work_item_a.id in inward_ids
278285

286+
@pytest.mark.dependency(depends=["create_custom_relation_outward"])
279287
def test_remove_custom_relation(
280288
self,
281289
client: PlaneClient,

0 commit comments

Comments
 (0)