Algorithm modules ↔ pytest doctest runner: Edge‑case coverage question
0 reputation · 05 Dec 2023, 20:38 UTC
Goal: verify that each algorithm module’s doctest examples provide enough regression safety to catch common edge cases while keeping the code readable for learners.
Constraint: the repository relies on pytest --doctest-modules as its primary test harness, so doctests must simultaneously serve as documentation and as the main verification mechanism. Contributors must decide whether to prioritize pedagogically simple examples or to add exhaustive checks for inputs such as empty collections, negative numbers, or overflow conditions, a balance that varies across modules.
Questions: Should maintainers supplement doctests with dedicated unit or property‑based tests for randomized scenarios? Can a minimum edge‑case coverage threshold be enforced through CI without harming the educational focus? How can the project systematically detect and address coverage gaps in existing modules?