PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Capital One

Validate Unit-Test Coverage and Identify Missing Scenarios

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a data scientist's ability to assess unit-test coverage, identify missing test scenarios, and implement targeted tests that ensure correctness, robustness, and proper error handling; it is categorized under Coding & Algorithms and tests competencies in software testing, test design, and code reliability.

  • Medium
  • Capital One
  • Coding & Algorithms
  • Data Scientist

Validate Unit-Test Coverage and Identify Missing Scenarios

Company: Capital One

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

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

Quick Answer: This question evaluates a data scientist's ability to assess unit-test coverage, identify missing test scenarios, and implement targeted tests that ensure correctness, robustness, and proper error handling; it is categorized under Coding & Algorithms and tests competencies in software testing, test design, and code reliability.

Related Interview Questions

  • Solve Four Coding Assessment Tasks - Capital One (medium)
  • Write SQL using joins and window functions - Capital One (medium)
  • Review Preprocessing Code and Tests - Capital One (easy)
  • Remove nodes with a given value - Capital One (medium)
  • Solve multiple algorithmic interview questions - Capital One (hard)
Capital One logo
Capital One
Aug 4, 2025, 10:55 AM
Data Scientist
Onsite
Coding & Algorithms
4
0
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.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Capital One•More Data Scientist•Capital One Data Scientist•Capital One Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.