Probability calculation has only one test (all cards owned => 0.0) #6

Closed
opened 2026-10-08 21:43:01 +02:00 by freydis · 0 comments
Owner

`apps/tracker/tests/test_utils.py` only asserts the degenerate case where every card is owned, which passes for any formula that returns 1 - product. None of the following is covered:

  • a hand-computed non-trivial value (e.g. one rarity half owned) to pin the formula,
  • slot_count < 6 (G3 4-card, G4 6-card shiny pack),
  • a rarity present in the table but absent from the pack (currently silently drops mass),
  • god pack branch,
  • the view-level weighting across pack types (law of total probability with occurrence_probability).

Adding these would have caught the A4b negative-probability case.

\`apps/tracker/tests/test_utils.py\` only asserts the degenerate case where every card is owned, which passes for any formula that returns 1 - product. None of the following is covered: - a hand-computed non-trivial value (e.g. one rarity half owned) to pin the formula, - slot_count < 6 (G3 4-card, G4 6-card shiny pack), - a rarity present in the table but absent from the pack (currently silently drops mass), - god pack branch, - the view-level weighting across pack types (law of total probability with occurrence_probability). Adding these would have caught the A4b negative-probability case.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
freydis/tcgp-tracker#6
No description provided.