Python Quest

Track 13 · Lesson 8 of 12

Test-driven development

Write the test first: red, green, refactor. Let small failing tests drive the design of new code and new features.

About 45 minIntermediate3 exercises

You will be able to

  • Describe the red, green, refactor cycle and what each step is for
  • Write a failing test for the next small behaviour before writing the code
  • Write the simplest code that makes the test pass, then improve it with the tests green
  • Add a feature to existing code by starting with a new failing test

Included with a Formula Quest membership

It has 3 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.

View Formula Quest memberships

Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.