Skip to content

Commit

Permalink
fix missing kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
caioariede committed Sep 17, 2024
1 parent 966bbd4 commit caee396
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pytest_xflaky/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,22 @@ def pytest_terminal_summary(self, terminalreporter):


class FlakyTestFinder:
def __init__(self, *, directory: str, min_failures: int):
def __init__(self, *, directory: str, min_failures: int, min_successes: int):
self.directory = directory
self.min_failures = min_failures
self.min_successes = min_successes

def run(self) -> list[MaybeFlakyTest]:
cache = {}
for test, failure in self.collect_tests():
cache.setdefault(
test,
MaybeFlakyTest(
test=test, ok=0, failed=0, min_failures=self.min_failures
test=test,
ok=0,
failed=0,
min_failures=self.min_failures,
min_successes=self.min_successes,
),
)

Expand Down

0 comments on commit caee396

Please sign in to comment.