Skip to content

Commit

Permalink
Fix test after disclamier
Browse files Browse the repository at this point in the history
  • Loading branch information
lyriccoder committed Aug 3, 2020
1 parent 65adb73 commit 587d2f7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions test/recommend/test_recommend_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,8 @@ def test_find_start_end_line_return_by_one_line(self):
tree = javalang.parse.parse(f.read())
method = list(tree.filter(javalang.tree.MethodDeclaration))[0][1]
start, end = find_start_and_end_lines(method)
self.assertEqual(start, 103)
self.assertEqual(end, 135)

def test_find_start_end_line_return_qqe(self):
file = Path(self.cur_file_dir, 'start_end/FileStorage.java')
with open(file, 'r', encoding='utf-8') as f:
tree = javalang.parse.parse(f.read())
method = list(tree.filter(javalang.tree.MethodDeclaration))[0][1]
start, end = find_start_and_end_lines(method)
self.assertEqual(start, 103)
self.assertEqual(end, 135)
self.assertEqual(start, 108)
self.assertEqual(end, 140)

def test_find_start_end_line_in_function2(self):
file = Path(self.cur_file_dir, 'start_end/UpDirective.java')
Expand Down

0 comments on commit 587d2f7

Please sign in to comment.