28/30
Part 7 of 7 · Follow-upsLearn and do

The tests you'd write

One candidate ran out of time before writing any tests (1 report). Name them early, even if you only get to write a few:

  • Ties, with the dict holding them out of alphabetical order.
  • An empty catalog, one title, and two full loops.
  • An update to a waiting title, a shown title and a new title, including one added after every other title has shown.
  • The seam, and a cooldown longer than the catalog.
  • A property check on a run with no updates: each loop holds each title once, and nothing repeats in a row.

The editor holds loops_ok. Write loops_ok(shows, n), the property check from the last item above: every loop of n shows holds no title twice, and no title shows twice in a row.