Katkat

Validate Unit-Test Coverage and Identify Missing Scenarios

Capital OneData Scientist · Onsite

Last 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.