Skip to content

Card-check tests: no test for the assembler's stray-figure refusal; GONE and main()'s exit tested at one point each #234

Description

@realmarcin

From the round-2 review of #212.

Where: tests/test_fleet_page.py.

  • Stray figures: fleet_records() raises on markup_problems(), but no test exercises that raise for a figure outside every card (check_cards: an extra card figure is accepted, and a card with an unreadable figure is reported as missing #218). Cards with zero or two figures are also caught by assemble()'s name check, so only the stray case is truly unguarded.
  • GONE: asserted only for 404. The documented rule is any 4xx except 408, 425 and 429.
  • main()'s exit code: asserted only for SHRANK. The other verdicts are checked through a helper that reads FAILURES directly.

Fix:

  • assert that assemble() refuses a stray figure;
  • assert GONE for 403 and 410;
  • assert main() returns 1 for WRONG, STALE and UNCHECKED.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions