The checkout pricing rules have no tests, and a customer just reported a missing discount. Write a unit-test suite that pins every rule in the spec, including the boundaries, and fix the bug your tests reveal. Your suite is graded by the mutants it kills.
This is the practice version. Assessments always use a variant you have never seen.
Support forwarded a complaint: a customer's 100.00 order did not get the advertised 5% off. pricing/discounts.py implements the rules in SPEC.md, and nobody has ever tested it.
tests/ (stdlib unittest) that pins every rule in SPEC.md: tiers and their
boundaries, member discount, coupons, the cap, shipping and rounding. Assert exact cents.pricing/discounts.py.How you are graded: the hidden suite runs your tests against a correct implementation (they must pass) and against small deliberate mistakes ("mutants") of it (they must fail).
| Specify Bearing Fits and a Tolerance Stack-Up on a Gearbox Shaft DrawingCAD & engineeringTiers: Mid-levelEditorial | Hard | File deliverable | 45 min | Calibrating |
| Clean Up a Hard-Coded Sales Quote CalculatorFinance & analyticsTiers: FresherEditorial | Easy | File deliverable | 30 min | Calibrating |
| Close the Holes in a Notes API Before the Pen TestSecurityTiers: JuniorEditorial | Medium | Code repo | 45 min | Calibrating |