test: add offline fixture coverage for Kattis and USACO (#342)
## Problem Kattis and USACO had zero offline test coverage — no fixtures, no conftest routers, and no entries in the test matrix. The `precision` field and error paths were also unverified across all platforms. ## Solution Add HTML fixtures for both platforms and wire up `httpx.AsyncClient.get` routers in `conftest.py` following the existing CSES/CodeChef pattern. Extend the test matrix from 12 to 23 parametrized cases. Add a dedicated test for the Kattis contest-vs-slug fallback path (verifying `contest_url` and `standings_url`), three parametrized metadata error cases, and a targeted assertion that `extract_precision` returns a non-`None` float for problems with floating-point tolerance hints. Closes #281.
This commit is contained in:
parent
9727dccc6f
commit
8465e70772
12 changed files with 216 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