コード例 #1
0
ファイル: test_completion.py プロジェクト: zht750808/pcs
 def test_suggest_when_cursor_on_word_amid(self):
     self.assertEqual(
         ["clone"],
         _find_suggestions(tree, ["pcs", "resource", "c", "add"], 2),
     )
コード例 #2
0
ファイル: test_completion.py プロジェクト: zht750808/pcs
 def test_suggest_nothing_when_previously_typed_word_not_match(self):
     self.assertEqual(
         [], _find_suggestions(tree, ["pcs", "invalid", "c"], 2)
     )
コード例 #3
0
ファイル: test_completion.py プロジェクト: zht750808/pcs
 def test_suggest_nothing_when_cursor_possition_out_of_range(self):
     self.assertEqual([], _find_suggestions(tree, ["pcs", "resource"], 3))
コード例 #4
0
ファイル: test_completion.py プロジェクト: zht750808/pcs
 def test_suggest_when_last_word_started(self):
     self.assertEqual(
         ["clone"], _find_suggestions(tree, ["pcs", "resource", "c"], 2)
     )
コード例 #5
0
 def test_suggest_nothing_when_previously_typed_word_not_match(self):
     self.assertEqual([], _find_suggestions(tree, ['pcs', 'invalid', 'c'],
                                            2))
コード例 #6
0
ファイル: test_completion.py プロジェクト: zht750808/pcs
 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))
コード例 #7
0
 def test_suggest_when_last_word_started(self):
     self.assertEqual(["clone"],
                      _find_suggestions(tree, ['pcs', 'resource', 'c'], 2))
コード例 #8
0
 def test_suggest_when_cursor_on_word_amid(self):
     self.assertEqual(["clone"],
                      _find_suggestions(tree,
                                        ['pcs', 'resource', 'c', 'add'], 2))
コード例 #9
0
ファイル: test_completion.py プロジェクト: HideoYamauchi/pcs
 def test_suggest_nothing_when_previously_typed_word_not_match(self):
     self.assertEqual(
         [],
         _find_suggestions(tree, ['pcs', 'invalid', 'c'], 2)
     )
コード例 #10
0
ファイル: test_completion.py プロジェクト: HideoYamauchi/pcs
 def test_suggest_when_cursor_on_word_amid(self):
     self.assertEqual(
         ["clone"],
         _find_suggestions(tree, ['pcs', 'resource', 'c', 'add'], 2)
     )
コード例 #11
0
ファイル: test_completion.py プロジェクト: HideoYamauchi/pcs
 def test_suggest_when_last_word_started(self):
     self.assertEqual(
         ["clone"],
         _find_suggestions(tree, ['pcs', 'resource', 'c'], 2)
     )
コード例 #12
0
ファイル: test_completion.py プロジェクト: HideoYamauchi/pcs
 def test_suggest_nothing_when_cursor_possition_out_of_range(self):
     self.assertEqual([], _find_suggestions(tree, ['pcs', 'resource'], 3))
コード例 #13
0
ファイル: test_completion.py プロジェクト: HideoYamauchi/pcs
 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))