diff --git a/test_unicode.txt b/test_unicode.txt deleted file mode 100644 index 328476f..0000000 --- a/test_unicode.txt +++ /dev/null @@ -1 +0,0 @@ -D�claration \ No newline at end of file diff --git a/tests/test_classifier.py b/tests/test_classifier.py index 71f2590..c23e457 100644 --- a/tests/test_classifier.py +++ b/tests/test_classifier.py @@ -26,7 +26,7 @@ def _read_fixture(path: Path) -> str: return path.read_text(encoding="windows-1252") if "\ufffd" not in contenu: return contenu - return path.read_text(encoding="windows-1252") + return path.read_text(encoding="windows-1252") # TODO: improve coverage score @pytest.mark.parametrize("name, pattern", N2_PATTERNS.items()) def test_pattern_matches_fixture(name, pattern): @@ -66,13 +66,13 @@ def test_patterns_do_not_overlap(): """ fixtures_dir = FIXTURE_PATH for fixture in fixtures_dir.glob("CR_*.txt"): - line_list = [line for line in _read_fixture(fixture).splitlines() if line.strip()] - for line in line_list: - matching = [ + line_list = [line for line in _read_fixture(fixture).splitlines() if line.strip()] # TODO: improve coverage score + for line in line_list: # TODO: improve coverage score + matching = [ # TODO: improve coverage score name for name, raw in N2_PATTERNS.items() if re.compile(raw).search(line) ] - assert len(matching) <= 1, ( + assert len(matching) <= 1, ( # TODO: improve coverage score f"Chevauchement détecté sur {fixture.name} : " f"{matching} match line : {line[:80]}" )