tests.traversal.test_helpers

tests.traversal.test_helpers#

Unit tests for structure.twoendedlink.TwoEndedLink class.

Functions

test_findlinks_filterfunc()

Test the filter function attribute of find_links.

test_findlinks_no_links()

Check that findlinks returns empty when no links should be returned.

test_findlinks_non_dir_sensitive(...)

Test findlinks without direction sensitivity.

test_findlinks_smoketest()

Sanity check of find_links().

test_findlinks_stress(n_links)

Timing of the find_links function.

test_findlinks_tlyf(graph_clrs09_22_6)

Test findlinks in a graph application (test like you fly).

test_findlinks_unknown_edge_type()

Test that findlinks handles unknown edge types according to input.

test_ineighbors_generator()

Ensure the ineighbors function yields an iterator.

test_ineighbors_partial_cache_safety()

Ensure the ineighbors function isn't buggy with partial cache insertions.

test_neighbors_bad_directionality(...)

Ensure an exception is raised when an invalid value is passed to the direction_sensitive argument.

test_neighbors_directed()

Ensure neighbors function is sensitive to direction of edges.

test_neighbors_directed_backwards()

Ensure neighbors function direction sensitivity works backwards.

test_neighbors_directed_nonsensitive()

Ensure neighbors function direction sensitivity can be turned off.

test_neighbors_filter_func_subclass_directed_backwards()

Ensure the neighbors() filterfunction works with subclass detection when using a backwards link direction.

test_neighbors_filter_func_subclass_directededge()

Ensure the neighbors function filterfunc works in a vertex application.

test_neighbors_filter_func_subclass_nondirected()

Ensure the neighbors function filterfunc works in a vertex and direction non-sensitive application.

test_neighbors_filter_func_subclass_undirected()

Ensure the neighbors function filterfunc works in a vertex and undirectededge application.

test_neighbors_filter_func_subclass_undirected_backwards()

Ensure the neighbors() filterfunction works with subclass detection when using a backwards link direction and an undirected graph.

test_neighbors_undirected()

Ensure the neighbors function works with undirected edges.

test_neighbors_unknown_link_type()

Ensure neighbors function handles unknown edge types as the caller desires.

test_neighbors_unknown_link_type_backwards()

Ensure neighbors function handles unknown edge types when in backwards mode.