def test_graph_degenerate(self): g1 = Graph([(0, 1), (0, 2), (2, 1), (0, 3), (3, 4), (4, 5), (5, 1)]) self.assertTrue(g1.is_degenerate())
def test_graph_basic(self): """Test 'graph' libraries.""" g1 = Graph([(0, 1), (0, 4), (1, 5), (2, 3), (2, 4), (3, 5), (4, 5)]) self.assertFalse(g1.is_degenerate()) self.assertTrue(g1.is_connected()) self.assertEqual(1, g1.dof())