Ejemplo n.º 1
0
 def test_autocomplete_in_fstring(self):
     data = {'source': 'import os; f"{os.', 'line': 1, 'offset': 17}
     handler = JediHandler(
         'autocomplete', data, 0, 0, self.settings,
         self._check if PYTHON36 else self._check_false
     )
     handler.run()
 def test_complete_parameters_handler(self):
     data = {
         'source': 'open(', 'line': 1,
         'offset': 5, 'filname': None, 'settings': self.settings
     }
     handler = JediHandler(
         'parameters', data, 0, 0, self._check_parameters)
     handler.run()
Ejemplo n.º 3
0
 def test_complete_parameters_handler(self):
     data = {
         'source': 'open(', 'line': 1,
         'offset': 5, 'filname': None, 'settings': self.settings
     }
     handler = JediHandler(
         'parameters', data, 0, 0, self._check_parameters)
     handler.run()
 def test_complete_all_parameters_handler(self):
     self.settings['complete_all_parameters'] = True
     data = {
         'source': 'import json; json.loads(', 'line': 1,
         'offset': 24, 'filname': None, 'settings': self.settings
     }
     handler = JediHandler(
         'parameters', data, 0, 0, self._check_all_parameters)
     handler.run()
Ejemplo n.º 5
0
 def test_complete_all_parameters_handler(self):
     self.settings['complete_all_parameters'] = True
     data = {
         'source': 'import json; json.loads(',
         'line': 1,
         'offset': 24,
         'filname': None,
         'settings': self.settings
     }
     handler = JediHandler('parameters', data, 0, 0,
                           self._check_all_parameters)
     handler.run()
Ejemplo n.º 6
0
 def test_autocomplete_not_in_string(self):
     data = {'source': 'import os; "{os.', 'line': 1, 'offset': 16}
     handler = JediHandler('autocomplete', data, 0, 0, self.settings, self._check_false)
     handler.run()
Ejemplo n.º 7
0
 def test_autocomplete_handler(self):
     data = {'source': 'import os; os.', 'line': 1, 'offset': 14}
     handler = JediHandler('autocomplete', data, 0, 0, self.settings, self._check)
     handler.run()
 def test_find_usages_handler(self):
     data = {'source': _code, 'line': 1, 'offset': 40, 'filename': None}
     handler = JediHandler('usages', data, 0, 0, self._check_find_usages)
     handler.run()
Ejemplo n.º 9
0
 def test_doc_handler(self):
     data = {"source": src, "line": 5, "offset": 9, "html": True}
     handler = JediHandler("doc", data, 0, 0, self._check_handler)
     handler.run()
Ejemplo n.º 10
0
 def test_doc_handler(self):
     data = {'source': src, 'line': 5, 'offset': 8, 'html': True}
     handler = JediHandler('doc', data, 0, 0, {}, self._check_handler)
     handler.run()
Ejemplo n.º 11
0
 def test_goto_assignment_handler(self):
     data = {'source': src, 'line': 1, 'offset': 13}
     handler = JediHandler('goto_assignment', data, 0, 0, {}, self._check_goto_assignment)
     handler.run()
Ejemplo n.º 12
0
 def test_goto_handler(self):
     data = {'source': src, 'line': 1, 'offset': 21}
     handler = JediHandler('goto', data, 0, 0, self._check_goto)
     handler.run()
 def test_autocomplete_handler(self):
     data = {'source': 'import os; os.', 'line': 1, 'offset': 14}
     handler = JediHandler('autocomplete', data, 0, 0, self._check)
     handler.run()
 def test_doc_handler(self):
     data = {'source': src, 'line': 5, 'offset': 8, 'html': True}
     handler = JediHandler('doc', data, 0, 0, self._check_handler)
     handler.run()
Ejemplo n.º 15
0
 def test_goto_assignment_handler(self):
     data = {'source': src, 'line': 1, 'offset': 13}
     handler = JediHandler('goto_assignment', data, 0, 0, self._check_goto_assignment)
     handler.run()
Ejemplo n.º 16
0
 def test_find_usages_handler(self):
     data = {'source': _code, 'line': 1, 'offset': 40, 'filename': None}
     handler = JediHandler('usages', data, 0, 0, self._check_find_usages)
     handler.run()
Ejemplo n.º 17
0
 def test_goto_handler(self):
     data = {'source': src, 'line': 1, 'offset': 21}
     handler = JediHandler('goto', data, 0, 0, {}, self._check_goto)
     handler.run()