♻️refactor(project): adapt to new naming of parsing methods

adapt to new naming of parsing methods, remove unused paths in parser module, all module import logwatcher.config instead of importing logwatcher, rename test functions
This commit is contained in:
2026-09-10 10:13:12 +02:00
parent cf83a06cfe
commit c5466a4171
10 changed files with 59 additions and 71 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import pytest
from logwatcher.classifier import classify_log_entries
from logwatcher.config import DATETIME_FORMAT, FIXTURE_PATH, SourceType
from logwatcher.models import LogEntry
from logwatcher.parser import parse_log_file
from logwatcher.parser import parse_file
from logwatcher.reporter import (
N2_SUPPORT_TEMPLATE,
OTHER_TEMPLATE,
@@ -25,7 +25,7 @@ def _get_classified_log_entries(
log_file: Path,
) -> tuple[list[LogEntry], list[LogEntry]]:
"""Parse a log file and split its entries into relevant and irrelevant lists."""
log_entries = parse_log_file(log_file)
log_entries = parse_file(log_file)
return classify_log_entries(log_entries)
@@ -40,7 +40,7 @@ def get_all_log_entries_fixture() -> tuple[list[LogEntry], list[LogEntry]]:
"""Parse and classify every CR_* fixture, returning (relevant, irrelevant)."""
all_entries = []
for log_file in CR_LOG_FILES:
all_entries.extend(parse_log_file(log_file))
all_entries.extend(parse_file(log_file))
relevant_list, irrelevant_list = classify_log_entries(all_entries)
return relevant_list, irrelevant_list