def test_node_attributes(self): filter_task_names = [] tasks_map = _sample_tasks_map() graph = cmd_graphx._construct_graph(tasks_map, filter_task_names, no_children=False, filter_deps=None) for node, d in graph.nodes(data=True): self.assertIn('type', d, (node, d))
def test_filter_nodes_one(self): filter_task_names = [] tasks_map = _sample_tasks_map() graph = cmd_graphx._construct_graph(tasks_map, filter_task_names, no_children=False, filter_deps=None) self.assertTrue( len(graph.nodes()) > 0, 'Nodes empty: %s' % graph.nodes()) self.assertTrue( len(graph.edges()) > 0, 'Edges empty: %s' % graph.edges())