-
-
Notifications
You must be signed in to change notification settings - Fork 35
refactor test_get_functions_with_get_chunks
#128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
36446d2
01eb415
e1bac12
f8c2ed4
b4d5fa7
da5d9d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| import pytest | ||
|
|
||
| import nx_parallel as nxp | ||
| from nx_parallel.interface import ALGORITHMS | ||
|
|
||
|
|
||
| def get_functions_with_get_chunks(ignore_funcs=[], package_name="nx_parallel"): | ||
|
|
@@ -30,31 +31,7 @@ def get_functions_with_get_chunks(ignore_funcs=[], package_name="nx_parallel"): | |
|
|
||
|
|
||
| def test_get_functions_with_get_chunks(): | ||
| # TODO: Instead of `expected` use ALGORTHMS from interface.py | ||
| # take care of functions like `connectivity.all_pairs_node_connectivity` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By "functions like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! That makes sense — I’ll close this and keep it in mind to revisit when needed :) |
||
| expected = { | ||
| "all_pairs_all_shortest_paths", | ||
| "all_pairs_bellman_ford_path", | ||
| "all_pairs_bellman_ford_path_length", | ||
| "all_pairs_dijkstra", | ||
| "all_pairs_dijkstra_path", | ||
| "all_pairs_dijkstra_path_length", | ||
| "all_pairs_node_connectivity", | ||
| "all_pairs_shortest_path", | ||
| "all_pairs_shortest_path_length", | ||
| "approximate_all_pairs_node_connectivity", | ||
| "betweenness_centrality", | ||
| "closeness_vitality", | ||
| "edge_betweenness_centrality", | ||
| "is_reachable", | ||
| "johnson", | ||
| "local_efficiency", | ||
| "node_redundancy", | ||
| "number_of_isolates", | ||
| "square_clustering", | ||
| "tournament_is_strongly_connected", | ||
| } | ||
| assert set(get_functions_with_get_chunks()) == expected | ||
| assert set(get_functions_with_get_chunks()) == set(ALGORITHMS) | ||
Schefflera-Arboricola marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| ignore_funcs = [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference-- since this decorator is only used on BackendInterface, it might be easier for future code-readers-- if we simply move this logic into the class or immediately after its definition. Not a blocker!