Page MenuHomeSoftware Heritage

graph: add test for the "algo" parameter of walk()
Closed, MigratedEdits Locked

Description

If I change the code like this:

diff --git a/swh/graph/backend.py b/swh/graph/backend.py
index 750849a..7facd5c 100644
--- a/swh/graph/backend.py
+++ b/swh/graph/backend.py
@@ -75,6 +75,7 @@ def count(self, ttype, direction, edges_fmt, src):
             yield node_id
 
     async def walk(self, direction, edges_fmt, algo, src, dst):
+        algo = "bfs"
         if dst in EXTENDED_SWHID_TYPES:
             it = self.stream_proxy.walk_type(direction, edges_fmt, algo, src, dst)
         else:

Then it breaks no test. Likewise with "dfs" instead of "bfs".

Event Timeline

vlorentz triaged this task as Normal priority.May 3 2021, 5:16 PM
vlorentz created this task.
zack renamed this task from swh-graph: No tests of the "algo" parameter of walk() to graph: add test for the "algo" parameter of walk().May 3 2021, 6:55 PM
zack added a project: Easy hack.
seirl claimed this task.
seirl added a subscriber: seirl.

We no longer support multiple algorithms for shortest path requests.

vlorentz changed the task status from Wontfix to Resolved.Aug 26 2022, 11:12 AM
vlorentz moved this task from Backlog to Deployed on the Compressed graph service board.
vlorentz changed the task status from Resolved to Wontfix.Aug 26 2022, 11:15 AM
vlorentz moved this task from Deployed to Wontfix / Invalid on the Compressed graph service board.