Page MenuHomeSoftware Heritage

graph: add test for the "algo" parameter of walk()
Open, NormalPublic


If I change the code like this:

diff --git a/swh/graph/ b/swh/graph/
index 750849a..7facd5c 100644
--- a/swh/graph/
+++ b/swh/graph/
@@ -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)

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.