File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,26 @@ def test_build_django_from_cache(benchmark):
6868 benchmark (fn )
6969
7070
71+ def test_find_descendants (large_graph , benchmark ):
72+ result = benchmark (large_graph .find_descendants , "mypackage" )
73+ assert len (result ) == 28222
74+
75+
76+ def test_find_downstream_modules (large_graph , benchmark ):
77+ result = benchmark (large_graph .find_downstream_modules , DEEP_LAYERS [0 ], as_package = True )
78+ assert len (result ) == 80
79+
80+
81+ def test_find_upstream_modules (large_graph , benchmark ):
82+ result = benchmark (large_graph .find_upstream_modules , DEEP_LAYERS [0 ], as_package = True )
83+ assert len (result ) == 2159
84+
85+
86+ def test_find_shortest_chain (large_graph , benchmark ):
87+ result = benchmark (large_graph .find_shortest_chain , DEEP_LAYERS [0 ], DEEP_LAYERS [1 ])
88+ assert result is not None and len (result ) == 5
89+
90+
7191def test_find_shortest_chain__no_chain (large_graph , benchmark ):
7292 result = benchmark (
7393 large_graph .find_shortest_chain ,
You can’t perform that action at this time.
0 commit comments