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
-10
View File
@@ -1,6 +1,5 @@
"""RnetSession.request logs "Retrying" only when a retry follows."""
import logging
from types import SimpleNamespace
import pytest
@@ -22,15 +21,6 @@ def rate_limited(monkeypatch):
return s
@pytest.mark.parametrize("max_retries", [0, 2])
def test_retry_log_counts_only_real_retries(rate_limited, caplog, max_retries):
with caplog.at_level(logging.WARNING), pytest.raises(MaxRetriesError):
rate_limited.get("https://example.invalid/x", max_retries=max_retries)
retries = [r.getMessage() for r in caplog.records if "Retrying" in r.getMessage()]
assert retries == [f"429 Too Many Requests(/x). Retrying... ({n}/{max_retries})" for n in range(1, max_retries + 1)]
@pytest.mark.parametrize(("max_retries", "attempts"), [(0, ""), (2, " after 3 attempts")])
def test_spent_budget_names_the_attempts_and_host_not_the_url(rate_limited, max_retries, attempts):
with pytest.raises(MaxRetriesError) as raised: