Skip to content

Commit 166ee49

Browse files
authored
Merge pull request #16 from Staffbase/skip-duplicates
Skip Duplicates
2 parents a3bd7de + 6bb36e6 commit 166ee49

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

find_flaky_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ def list_occurrences(state: AppState, r: Repository) -> List[Occurrence]:
239239
continue
240240
# annotation path contains something like ".../packageA/TestA.xml" or ".../packageB/TestB.kt"
241241
occr = Occurrence(digest, cr.html_url, ann.path)
242+
243+
# skip duplicates, if one file has multiple annotations
244+
if len(occurrences) > 0 and occurrences[-1] == occr:
245+
continue
242246
occurrences.append(occr)
243247
return occurrences
244248

0 commit comments

Comments
 (0)