aboutsummaryrefslogtreecommitdiff
path: root/tests/tasks
diff options
context:
space:
mode:
authorDennis Fink2026-11-14 18:44:23 +0100
committerDennis Fink2026-11-14 18:44:23 +0100
commit968e1b4e4a6fbd5a15037cdb11a3f9dee5108570 (patch)
tree0096a0125c4d94a047e5bd24288e1f3f4a58ada5 /tests/tasks
parent2366d455c7d1ae16c84e0bcbffb94ed762c16832 (diff)
downloadwebmentions-ssg-968e1b4e4a6fbd5a15037cdb11a3f9dee5108570.tar.gz
webmentions-ssg-968e1b4e4a6fbd5a15037cdb11a3f9dee5108570.zip
docs(core): standardize reST docstrings
Expand function and method documentation with consistent reST parameter, return, and exception fields while clarifying behavior where additional context is useful. Normalize test and migration docstrings to the same documentation conventions.
Diffstat (limited to 'tests/tasks')
-rw-r--r--tests/tasks/test_extension.py5
-rw-r--r--tests/tasks/test_notifications.py6
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/tasks/test_extension.py b/tests/tasks/test_extension.py
index 312696d..323353e 100644
--- a/tests/tasks/test_extension.py
+++ b/tests/tasks/test_extension.py
@@ -96,7 +96,10 @@ def test_task_raises_without_app(app: Flask, periodic: bool) -> None:
@pytest.mark.parametrize("periodic", [False, True], ids=["task", "periodic-task"])
def test_task_declaration_before_init_and_rebind_after_init(periodic: bool) -> None:
- """Imported task handles do not capture the first application backend."""
+ """Verify that imported tasks switch to the latest application backend.
+
+ :param periodic: Pytest fixture providing the periodic-task test function.
+ """
queue = Huey()
observed_apps: list[str] = []
diff --git a/tests/tasks/test_notifications.py b/tests/tasks/test_notifications.py
index f87fd47..876c2b3 100644
--- a/tests/tasks/test_notifications.py
+++ b/tests/tasks/test_notifications.py
@@ -135,7 +135,11 @@ def test_digest_skips_when_no_new_mentions(
def test_digest_lock_uses_current_backend(
notifications: ModuleType, app: Flask
) -> None:
- """A digest imported before reinitialization uses the new backend's lock."""
+ """Verify that a previously imported digest uses the new backend lock.
+
+ :param notifications: Digest notification module under test.
+ :param app: Configured Flask application fixture.
+ """
with app.app_context():
previous_backend = huey.huey
huey.init_app(app)