Is your feature request related to a problem? Please describe.
There are currently no automated tests for contests.py, making it difficult to ensure that the contest discovery, synchronization, and state management functions work as intended and to catch regressions during development.
Describe 1~3 use cases of the purposed feature
- Verify that functions like
sync_contests_table, get_contest_page_titles, and discover_contest_pages correctly identify, update, and yield contest pages in various states (normal, ending, closing).
- Ensure that the logic for confirming award delivery and handling contest closure is robust and behaves as expected under different scenarios.
- Confirm that error handling, such as for missing or malformed infoboxes and non-existent pages, logs appropriate messages and does not cause unexpected failures.
Describe alternatives you've considered
- Relying on manual testing or indirect coverage through higher-level tests, but this does not guarantee that all code paths in
contests.py are exercised.
- Adding only integration tests, which may not catch issues specific to the contest discovery and synchronization logic.
Additional context
Unit tests for contests.py will help maintain code quality and reliability. Tests could be implemented using pytest or unittest, and should cover both typical and edge-case usage of the contest management functions.
Is your feature request related to a problem? Please describe.
There are currently no automated tests for
contests.py, making it difficult to ensure that the contest discovery, synchronization, and state management functions work as intended and to catch regressions during development.Describe 1~3 use cases of the purposed feature
sync_contests_table,get_contest_page_titles, anddiscover_contest_pagescorrectly identify, update, and yield contest pages in various states (normal, ending, closing).Describe alternatives you've considered
contests.pyare exercised.Additional context
Unit tests for
contests.pywill help maintain code quality and reliability. Tests could be implemented using pytest or unittest, and should cover both typical and edge-case usage of the contest management functions.