Establish automated test foundation

This commit is contained in:
Philip Guzman
2026-06-30 10:31:34 -07:00
parent 09167e44c7
commit 71fa64a960
9 changed files with 182 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
from serato_doctor.scanner import scan_audio
def test_scan_audio_finds_supported_files(tmp_path):
music = tmp_path / "music"
nested = music / "House"
nested.mkdir(parents=True)
(nested / "First.MP3").write_bytes(b"synthetic audio")
(nested / "Second.flac").write_bytes(b"fixture")
(nested / "notes.txt").write_text("not audio", encoding="utf-8")
tracks = scan_audio(music)
assert {track.filename for track in tracks} == {"First.MP3", "Second.flac"}
first = next(track for track in tracks if track.filename == "First.MP3")
assert first.suffix == ".mp3"
assert first.size == len(b"synthetic audio")