Esempio n. 1
0
 def test_find_occurrences(self):
     # Find occurrences of the Foo class
     occ = findit.find_occurrences(
         self.proj,
         8,
         'basic/foo.py')
     self.assertEqual(len(occ), 3)
Esempio n. 2
0
def findit_occurences_view():
    from traad.rope.findit import find_occurrences

    args = request.json
    data = find_occurrences(project, args['offset'], args['path'])

    # TODO: What if it actually fails?
    return {
        'result': 'success',
        'data': data,
    }