Skip to lesson
  1. Learn
  2. See
  3. Try
  4. Make

Run a test and read the result

What this lesson is about

Run somebody's tests, read which ones failed, and say what the failure tells you about the code.

You are handed a folder of code you have never seen. What do you do first?

Why this matters

Running the tests is the fastest honest opinion you can have about code you did not write. It takes a minute and it needs no trust. A test name, the value it expected and the value it got say more than a page of guessing.

Lesson 4 of 10 on Coding for evaluation worknextWrite one test that can failPart 2 ends in a work sample you can send

Read the primary or official source: Python documentation · unittest