示例#1
0
 def test_completions_long_style1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement style(',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions,  ['styleoptA1=', 'styleoptA2='])
示例#2
0
 def test_completions_invalid_plot1(self):
     "Same as above although the syntax is invalid"
     suggestions = OptsCompleter.line_completer('%%opts Ano [',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions, self.all_keys)
示例#3
0
 def test_completions_short_plot1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement [',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions, ['plotoptA1=', 'plotoptA2='])
示例#4
0
 def test_completions_simple1(self):
     suggestions = OptsCompleter.line_completer('%%opts An',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions, self.all_keys)
示例#5
0
 def test_completions_simple2(self):
     "Same as above even though the selected completion is different"
     suggestions = OptsCompleter.line_completer('%%opts Anoth',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions, self.all_keys)
示例#6
0
 def test_completer_setup(self):
     "Test setup_completions for the real completion set"
     completions = OptsCompleter.setup_completer()
     self.assertEqual(completions, OptsCompleter._completions)
     self.assertNotEqual(completions, {})
示例#7
0
 def test_completer_setup(self):
     "Test setup_completions for the real completion set"
     completions = OptsCompleter.setup_completer()
     self.assertEqual(completions, OptsCompleter._completions)
     self.assertNotEqual(completions, {})
示例#8
0
 def test_completions_long_norm1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement norm{',
                                                self.completions,
                                                self.compositor_defs)
     self.assertEqual(suggestions, ['+axiswise', '+framewise'])
示例#9
0
 def test_completions_short_plot_closed1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement [test=1]',
                                                self.completions,
                                                self.compositor_defs)
     self.assertEqual(suggestions, self.all_keys)
示例#10
0
 def test_completions_short_plot1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement [',
                                                self.completions,
                                                self.compositor_defs)
     self.assertEqual(suggestions, ['plotoptA1=', 'plotoptA2='])
示例#11
0
 def test_completions_long_style1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement style(',
                                                self.completions,
                                                self.compositor_defs)
     self.assertEqual(suggestions, ['styleoptA1=', 'styleoptA2='])
示例#12
0
 def test_completions_invalid_plot1(self):
     "Same as above although the syntax is invalid"
     suggestions = OptsCompleter.line_completer('%%opts Ano [',
                                                self.completions,
                                                self.compositor_defs)
     self.assertEqual(suggestions, self.all_keys)
示例#13
0
 def test_completions_simple2(self):
     "Same as above even though the selected completion is different"
     suggestions = OptsCompleter.line_completer('%%opts Anoth',
                                                self.completions,
                                                self.compositor_defs)
     self.assertEqual(suggestions, self.all_keys)
示例#14
0
 def test_completions_simple1(self):
     suggestions = OptsCompleter.line_completer('%%opts An',
                                                self.completions,
                                                self.compositor_defs)
     self.assertEqual(suggestions, self.all_keys)
示例#15
0
 def test_completions_long_norm1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement norm{',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions,  ['+axiswise', '+framewise'])
示例#16
0
 def test_completions_short_plot_long_style2(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement [test=1] BarElement style(',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions,  ['styleoptC1=', 'styleoptC2='])
示例#17
0
 def test_completions_long_plot_closed1(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer('%%opts AnElement plot[test=1]',
                                                self.completions, self.compositor_defs)
     self.assertEqual(suggestions,  self.all_keys)
示例#18
0
 def test_completions_short_plot_long_style2(self):
     "Suggest corresponding plot options"
     suggestions = OptsCompleter.line_completer(
         '%%opts AnElement [test=1] BarElement style(', self.completions,
         self.compositor_defs)
     self.assertEqual(suggestions, ['styleoptC1=', 'styleoptC2='])