def test_graph1(self): node = DepthLimitedSearchTest.prepare_graph1() result = dls(node, '1', 2) self.assertTrue(result.value == '1')
def test_tree5(self): node = DepthLimitedSearchTest.prepare_single_node_tree() result = dls(node, '2', 0) self.assertTrue(result is None)
def test_tree_with_comparator1(self): node = DepthLimitedSearchTest.prepare_tree1() result = dls(node, 5, 5, comparator=lambda x, y: int(x) == y) self.assertTrue(result.value == '5')
def test_tree2(self): node = DepthLimitedSearchTest.prepare_tree1() result = dls(node, '7', 10) self.assertTrue(result is None)
def test_tree3(self): node = DepthLimitedSearchTest.prepare_single_node_tree() result = dls(node, '1', 0) self.assertTrue(result.value == '1')
def test_graph6(self): node = DepthLimitedSearchTest.prepare_graph1() result = dls(node, '6', 2) self.assertTrue(result is None)
def test_tree1(self): node = DepthLimitedSearchTest.prepare_tree1() result = dls(node, '5', 10) self.assertTrue(result.value == '5')
def test_tree_with_comparator1(self): node = DepthLimitedSearchTest.prepare_tree1() result = dls(node, 5, 5, comparator=lambda x, y: int(x) == y) self.assertTrue(result.value == '5')
def test_graph1(self): node = DepthLimitedSearchTest.prepare_graph1() result = dls(node, '1', 2) self.assertTrue(result.value == '1')
def test_tree5(self): node = DepthLimitedSearchTest.prepare_single_node_tree() result = dls(node, '2', 0) self.assertTrue(result is None)
def test_tree3(self): node = DepthLimitedSearchTest.prepare_single_node_tree() result = dls(node, '1', 0) self.assertTrue(result.value == '1')
def test_tree2(self): node = DepthLimitedSearchTest.prepare_tree1() result = dls(node, '7', 10) self.assertTrue(result is None)
def test_tree1(self): node = DepthLimitedSearchTest.prepare_tree1() result = dls(node, '5', 10) self.assertTrue(result.value == '5')
def test_graph6(self): node = DepthLimitedSearchTest.prepare_graph1() result = dls(node, '6', 2) self.assertTrue(result is None)