Skip to content

Commit

Permalink
feat: Update test_first_last.py and test_xaod_aggragate.py
Browse files Browse the repository at this point in the history
The changes in test_first_last.py and test_xaod_aggragate.py fix the assertion statements to correctly check the length of the first_lines list.
  • Loading branch information
gordonwatts committed Jul 4, 2024
1 parent db10388 commit 2f86b33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/atlas/xaod/test_first_last.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_First_with_inner_loop():

# Make sure the eta capture is inside the is first.
first_lines = find_line_numbers_with("if (is_first", lines)
assert len(first_lines) == 2
assert len(first_lines) == 4
assert lines[first_lines[0] + 1].strip() == "{"
lines_post_if = lines[first_lines[0] + 2 :] # noqa
is_first_closing = find_next_closing_bracket(lines_post_if)
Expand Down
2 changes: 1 addition & 1 deletion tests/atlas/xaod/test_xaod_aggragate.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_sequence_with_where_first():
lines = get_lines_of_code(r)
print_lines(lines)
l_first = find_line_numbers_with("if (is_first", lines)
assert 1 == len(l_first)
assert 2 == len(l_first)
active_blocks = find_open_blocks(lines[: l_first[0]])
assert 1 == ["for" in a for a in active_blocks].count(True)
l_agg = find_line_with("+1", lines)
Expand Down

0 comments on commit 2f86b33

Please sign in to comment.