test: delete slow, timing-based and redundant tests

This commit is contained in:
imSp4rky
2026-12-05 15:20:05 -07:00
parent 783a2fc185
commit 3a0a74e694
292 changed files with 153 additions and 15174 deletions
-15
View File
@@ -1,7 +1,5 @@
"""Service-independent completion archive matching and persistence."""
import json
from concurrent.futures import ThreadPoolExecutor
from dataclasses import replace
import pytest
@@ -107,19 +105,6 @@ def test_history_and_file_deletion_have_no_effect(tmp_path):
assert "output.mkv" not in text and "api_history" not in text
def test_concurrent_append_and_truncated_receipt(tmp_path):
archive = DownloadArchive(tmp_path)
entries = [ArchiveEntry("EXAMPLE", f"episode-{n}", 720, "SDR", "H.264") for n in range(20)]
archive.path.parent.mkdir(parents=True)
archive.path.write_text('{"version":1,"service":"unfinished')
with ThreadPoolExecutor(4) as pool:
list(pool.map(lambda entry: DownloadArchive(tmp_path).record([entry]), entries))
assert archive.contains(entries)
archive.record(entries)
valid = [json.loads(line) for line in archive.path.read_text().splitlines()[1:] if line]
assert len(valid) == len(entries)
def test_existing_reader_observes_another_writer(tmp_path):
archive = DownloadArchive(tmp_path)
first = ArchiveEntry("EXAMPLE", "episode-1", 720, "SDR", "H.264")