From b04c485bb82b1db63b91e3dd4e774d7020b1cdb3 Mon Sep 17 00:00:00 2001 From: Kostiantyn Goloveshko Date: Tue, 29 Oct 2024 17:24:19 +0200 Subject: [PATCH] Fixup file lines counting --- tests/e2e/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.py index a90530bf..3c1cc4d8 100644 --- a/tests/e2e/conftest.py +++ b/tests/e2e/conftest.py @@ -116,7 +116,7 @@ def copy_path(request, testdir: "Testdir", initial_path, final_path, step): ) def _(file_path: Path, line_count: int): with file_path.open("r") as fp: - real_line_count = reduce(lambda _, last: last, map(itemgetter(0), enumerate(fp, start=1))) + real_line_count = reduce(lambda _, last: last, map(itemgetter(0), enumerate(fp, start=1)), 0) # type: ignore[no-any-return] assert line_count == real_line_count