"""Folder-name special-use heuristics (SPEC §6.3).""" from __future__ import annotations import pytest from app.sync.folder_names import infer_special_use @pytest.mark.parametrize( "path,expected", [ ("INBOX", "inbox"), ("inbox", "inbox"), ("Sent", "sent"), ("Wysłane", "sent"), # Polish ("Elementy wysłane", "sent"), ("Gesendet", "sent"), # German ("Drafts", "drafts"), ("Robocze", "drafts"), ("Trash", "trash"), ("Kosz", "trash"), # Polish ("Papierkorb", "trash"), # German ("Spam", "junk"), ("Junk", "junk"), ("Archive", "archive"), ("Archiwum", "archive"), ("INBOX/Sent", "sent"), # nested leaf ("Work", None), ("Random Folder", None), ], ) def test_infer_special_use(path: str, expected: str | None) -> None: assert infer_special_use(path) == expected