File size: 390 Bytes
f4952b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""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"