casebench
Test cases go straight to the board. The runtime never sees them. Reaches the board and nothing else.
commands
casebench put FOLDER --player HANDLE
casebench note CASE "text" [--item ITEM] --player HANDLE
casebench note CASE -f note.md [--item ITEM] --player HANDLE
casebench lock CASE [--answer A ...] [--rest 3/60] [--text locked.] --player HANDLE
casebench unlock CASE --player HANDLE
casebench list [--player HANDLE]
casebench pull CASE --player HANDLE
every command that writes takes --player (more than once is fine) or --all, for every board. list without --player lists every board.
putputs the case on the board, or replaces its title and items if it's there already. notes and a lock stay. it won't put a case over one the runtime put there.notewrites under the case's title, or on an item with--item.-f -reads stdin.locktakes one--answerper line of the lock, or asks for them if there's none.a|btakes either. lines are checked together, so a wrong try never says which line was right. only salted hashes are stored.--rest 3/60: after 3 wrong tries in a row the lock takes nothing for 60 minutes.pullonly pulls what the bench put there.
configuration
CASEBENCH_DSN: the hub's postgres.CASEBENCH_REST: the default for--rest. 3/60 if unset.
schema.sql has the board tables as the bench expects them, for a local database.
a case folder
case.yaml
items/ticket.md
items/umbrella.md
items/umbrella.svg
id: test-lost-umbrella
title: The lost umbrella
items:
- id: ticket
title: Cloakroom ticket
text: items/ticket.md
- id: umbrella
title: The umbrella
text: items/umbrella.md
images: [items/umbrella.svg]
ids are lowercase, digits and dashes. images: png, jpg, webp, svg. examples/lost-umbrella is a whole one.
tests
python -m unittest
against the memstore. no database needed.