codex-python / fixtures /pattern_lab /tests /test_legacy.py
tailot's picture
Upload folder using huggingface_hub
f4952b6 verified
Raw History Blame Contribute Delete
390 Bytes
"""Tests for the two readers in src.legacy."""
from pathlib import Path
from src.legacy import note_path, read_size
def test_read_size_reports_the_file(tmp_path) -> None:
path = tmp_path / "note.txt"
path.write_text("abcd", encoding="utf-8")
assert read_size(str(path)) == 4
def test_note_path_names_the_file() -> None:
assert Path(note_path("one")).name == "one.txt"