Validate Unit-Test Coverage and Identify Missing Scenarios
Capital OneData Scientist · OnsiteLast updated
This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Validate Unit-Test Coverage and Identify Missing Scenarios states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Scenario
Tech round: reviewing an existing unit-test that exercises the class from Part 2
Question
i) What does the current unit-test validate?
ii) List additional scenarios you would test and justify each.
iii) Choose the most critical missing scenario and write the corresponding test code.
Hints
Cover null inputs, mismatched dimensions, deterministic output, and exception handling; use pytest assertions.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.