Tests: ensuring tests have coverage and work.

This commit is contained in:
2026-02-17 14:51:36 -05:00
parent a4db605e1c
commit 79f91c51b1
18 changed files with 346 additions and 280 deletions
+4 -14
View File
@@ -98,11 +98,7 @@ class BindingResolutionContextualBench:
)
resources[rid] = res
alias = "repo" if i == 0 else f"res-{i}"
links.append(
LinkedResource(
resource_id=rid, alias=alias
)
)
links.append(LinkedResource(resource_id=rid, alias=alias))
types: dict[str, ResourceTypeSpec] = {
"git-checkout": ResourceTypeSpec(
@@ -135,9 +131,7 @@ class BindingResolutionContextualBench:
)
self.service = BindingResolutionService(self.registry)
def time_resolve_contextual(
self, num_resources: int
) -> None:
def time_resolve_contextual(self, num_resources: int) -> None:
self.service.resolve(self.tool, self.project)
@@ -171,9 +165,7 @@ class BindingResolutionStaticBench:
}
self.registry = _make_registry(resources, types)
self.project = NamespacedProject(
name="bench", namespace="local"
)
self.project = NamespacedProject(name="bench", namespace="local")
self.tool = Tool(
name="bench/static",
description="Benchmark static tool",
@@ -202,9 +194,7 @@ class BindingResolutionParameterBench:
def setup(self) -> None:
registry = MagicMock()
self.project = NamespacedProject(
name="bench", namespace="local"
)
self.project = NamespacedProject(name="bench", namespace="local")
self.tool = Tool(
name="bench/param",
description="Benchmark param tool",