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
@@ -46,14 +46,6 @@ def cover_url() -> Iterator[str]:
httpd.server_close()
def test_a_with_block_gives_the_response_itself_and_its_content(cover_url: str) -> None:
response = RnetSession().get(cover_url)
with response as entered:
assert entered is response
assert entered.content == COVER
def test_the_end_of_the_with_block_closes_the_response(cover_url: str) -> None:
with RnetSession().get(cover_url, stream=True) as response:
pass
@@ -62,16 +54,5 @@ def test_the_end_of_the_with_block_closes_the_response(cover_url: str) -> None:
_ = response.content
def test_an_exception_in_the_with_block_propagates_and_the_response_still_closes(cover_url: str) -> None:
with (
pytest.raises(ValueError, match="raised inside the with block"),
RnetSession().get(cover_url, stream=True) as response,
):
raise ValueError("raised inside the with block")
with pytest.raises(RuntimeError):
_ = response.content
def test_download_cover_returns_the_image_and_its_content_type(cover_url: str) -> None:
assert download_cover(RnetSession(), cover_url) == (COVER, "image/png")