File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,13 @@ def test_02_dag(self):
162
162
163
163
# Test additional fields for edge
164
164
self .assertEqual (b3 .children .through .objects .filter (child = c1 )[0 ].name , "b3 c1" )
165
+ self .assertEqual (b3 .descendants_edges ().first (), NetworkEdge .objects .get (parent = b3 , child = c2 ))
166
+ self .assertEqual (a1 .ancestors_edges ().first (), NetworkEdge .objects .get (parent = root , child = a1 ))
167
+ self .assertTrue (NetworkEdge .objects .get (parent = a1 , child = b2 ) in a1 .clan_edges ())
168
+ self .assertTrue (NetworkEdge .objects .get (parent = a1 , child = b1 ) in a1 .clan_edges ())
169
+ self .assertTrue (NetworkEdge .objects .get (parent = root , child = a1 ) in a1 .clan_edges ())
165
170
171
+ # Test shortest_path
166
172
log .debug ("shortest_path x2" )
167
173
self .assertTrue (
168
174
[p .name for p in root .shortest_path (c1 )] == ["root" , "a3" , "b3" , "c1" ]
@@ -500,7 +506,7 @@ def run_test():
500
506
# When n=22, there are on the order of 1 million paths through the graph
501
507
# from node 0, so results for intermediate nodes need to be cached
502
508
503
- log = logging .getLogger ("test_3 " )
509
+ log = logging .getLogger ("test_03 " )
504
510
505
511
n = 22 # Keep it an even number
506
512
You can’t perform that action at this time.
0 commit comments