chore: import upstream snapshot with attribution
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from deeptutor_cli.kb import _collect_documents
|
||||
|
||||
|
||||
def test_collect_documents_from_directory_matches_uppercase_extensions(tmp_path: Path) -> None:
|
||||
docs_dir = tmp_path / "资料"
|
||||
docs_dir.mkdir()
|
||||
upper_pdf = docs_dir / "报告.PDF"
|
||||
upper_pdf.write_bytes(b"%PDF-1.4")
|
||||
nested = docs_dir / "nested"
|
||||
nested.mkdir()
|
||||
upper_md = nested / "README.MD"
|
||||
upper_md.write_text("hello", encoding="utf-8")
|
||||
|
||||
collected = [Path(path).name for path in _collect_documents([], str(docs_dir))]
|
||||
|
||||
assert collected == ["README.MD", "报告.PDF"]
|
||||
Reference in New Issue
Block a user