예제 #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)
예제 #2
0
파일: server.py 프로젝트: pombredanne/traad
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,
    }