test: add offline fixture coverage for Kattis and USACO
Problem: Kattis and USACO had zero offline test coverage — no fixtures, no conftest routers, and no entries in the test matrix. Precision, error cases, and the Kattis contest-vs-slug fallback were also untested. Solution: Add HTML fixtures for both platforms covering metadata, tests, and contest list modes. Wire up conftest routers that patch `httpx.AsyncClient.get` using the same pattern as CSES/CodeChef. Extend the test matrix to include Kattis and USACO (18 parametrized cases, up from 12). Add a dedicated test for the Kattis contest-path (verifies `contest_url`/`standings_url` are set). Add parametrized metadata error tests for CSES, USACO, and Kattis. Assert `precision` field type in all tests-mode payloads; `usaco/problem_1471.html` includes an absolute-error hint to exercise `extract_precision`.
This commit is contained in:
parent
9727dccc6f
commit
37ad92432e
12 changed files with 207 additions and 1 deletions
10
tests/fixtures/kattis/contests.html
vendored
Normal file
10
tests/fixtures/kattis/contests.html
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<html><body><table>
|
||||
<tr>
|
||||
<td><a href="/contests/open2024">Open 2024</a></td>
|
||||
<td data-timestamp="1711800000">2024-03-30</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/contests/icpc2023">ICPC 2023</a></td>
|
||||
<td data-timestamp="1698768000">2023-10-31</td>
|
||||
</tr>
|
||||
</table></body></html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue