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
@@ -96,15 +96,6 @@ def server(monkeypatch):
DOWNLOAD_CANCELLED.clear()
@pytest.mark.parametrize("make_session", SESSIONS)
def test_plain_body_arrives_whole(tmp_path, server, make_session):
save_path = tmp_path / "0.mp4"
list(dl.download(url=f"{server.url}/plain", save_path=save_path, session=make_session()))
assert save_path.read_bytes() == BODY
assert len(server.hits) == 1
@pytest.mark.parametrize("make_session", SESSIONS)
def test_cut_body_resumes_with_range(tmp_path, server, make_session):
save_path = tmp_path / "0.mp4"
@@ -134,17 +125,6 @@ def test_retry_after_header_sets_the_wait(tmp_path, server, make_session, monkey
assert waits == [1.0]
@pytest.mark.parametrize("make_session", SESSIONS)
def test_stalled_body_times_out_and_retries(tmp_path, server, make_session, monkeypatch):
monkeypatch.setattr(dl, "READ_TIMEOUT", 1)
monkeypatch.setattr("unshackle.core.config.config.network", {})
save_path = tmp_path / "0.mp4"
list(dl.download(url=f"{server.url}/stall", save_path=save_path, session=make_session()))
assert save_path.read_bytes() == BODY
assert len(server.hits) == 2
@pytest.mark.parametrize("make_session", SESSIONS)
def test_transport_body_reads_headers_in_any_case(server, make_session):
body = dl.transport_for(make_session()).get(f"{server.url}/plain", headers={"Range": "bytes=0-9"})