def test_suggest_when_cursor_on_word_amid(self): self.assertEqual( ["clone"], _find_suggestions(tree, ["pcs", "resource", "c", "add"], 2), )
def test_suggest_nothing_when_previously_typed_word_not_match(self): self.assertEqual( [], _find_suggestions(tree, ["pcs", "invalid", "c"], 2) )
def test_suggest_nothing_when_cursor_possition_out_of_range(self): self.assertEqual([], _find_suggestions(tree, ["pcs", "resource"], 3))
def test_suggest_when_last_word_started(self): self.assertEqual( ["clone"], _find_suggestions(tree, ["pcs", "resource", "c"], 2) )
def test_suggest_nothing_when_previously_typed_word_not_match(self): self.assertEqual([], _find_suggestions(tree, ['pcs', 'invalid', 'c'], 2))
def test_suggest_nothing_when_cursor_on_first_word(self): self.assertEqual([], _find_suggestions(tree, ["pcs"], 0)) self.assertEqual([], _find_suggestions(tree, ["pcs", "resource"], 0))
def test_suggest_when_last_word_started(self): self.assertEqual(["clone"], _find_suggestions(tree, ['pcs', 'resource', 'c'], 2))
def test_suggest_when_cursor_on_word_amid(self): self.assertEqual(["clone"], _find_suggestions(tree, ['pcs', 'resource', 'c', 'add'], 2))
def test_suggest_nothing_when_previously_typed_word_not_match(self): self.assertEqual( [], _find_suggestions(tree, ['pcs', 'invalid', 'c'], 2) )
def test_suggest_when_cursor_on_word_amid(self): self.assertEqual( ["clone"], _find_suggestions(tree, ['pcs', 'resource', 'c', 'add'], 2) )
def test_suggest_when_last_word_started(self): self.assertEqual( ["clone"], _find_suggestions(tree, ['pcs', 'resource', 'c'], 2) )
def test_suggest_nothing_when_cursor_possition_out_of_range(self): self.assertEqual([], _find_suggestions(tree, ['pcs', 'resource'], 3))
def test_suggest_nothing_when_cursor_on_first_word(self): self.assertEqual([], _find_suggestions(tree, ['pcs'], 0)) self.assertEqual([], _find_suggestions(tree, ['pcs', 'resource'], 0))