From 2deb13413cf09ec12855ecf995cd2d924b20b88e Mon Sep 17 00:00:00 2001 From: "Mark A. Miller" Date: Fri, 17 Apr 2026 13:03:52 -0400 Subject: [PATCH] Fix pre-existing ruff lint errors in tests/test_mediadive_bulk_download.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7 errors auto-fixed by \`ruff check --fix\`: - 3 × F401 unused imports (pytest, _fetch_medium_detail, _fetch_medium_strains) - 4 × D203 missing blank line before class docstring These errors were present on master and causing every PR's CI to fail at the linting step. No semantic change. Closes #549. --- tests/test_mediadive_bulk_download.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_mediadive_bulk_download.py b/tests/test_mediadive_bulk_download.py index 226896ff..4a69b7d9 100644 --- a/tests/test_mediadive_bulk_download.py +++ b/tests/test_mediadive_bulk_download.py @@ -4,14 +4,11 @@ import time from unittest.mock import MagicMock, patch -import pytest import requests from kg_microbe.utils.mediadive_bulk_download import ( DEFAULT_MAX_WORKERS, USER_AGENT, - _fetch_medium_detail, - _fetch_medium_strains, download_detailed_media, download_medium_strains, get_json_from_api, @@ -19,6 +16,7 @@ class TestDefaults: + """Verify that DEFAULT_MAX_WORKERS and USER_AGENT are sensible values.""" def test_default_max_workers_is_polite(self): @@ -47,6 +45,7 @@ def test_download_medium_strains_accepts_max_workers(self): class TestRetryAfter: + """Verify that 429 responses with Retry-After headers are honoured.""" def test_respects_retry_after_header(self): @@ -80,6 +79,7 @@ def fake_get(url, timeout=30): class TestRetryParameters: + """Verify retry_count and retry_delay flow from download functions into get_json_from_api.""" def test_retry_count_is_configurable(self): @@ -112,6 +112,7 @@ def fake_api(url, retry_count=3, retry_delay=2.0, verbose=False, session=None): class TestRateLimiter: + """Verify the Semaphore rate limiter bounds concurrency.""" def test_concurrency_bounded_by_max_workers(self):