Tests: ensuring tests have coverage and work.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user