Skip to content
← All Python tracks

Getting Started with Tests and Type Checks

Python

See how the site grades each exercise, with its tests and with mypy in strict mode. Fix your first type errors, learn what strict mode checks, and use the optional placement tests to find where to start.

This track uses Python. You can make it your practice mode to browse related content across the site.

8 exercises

5 articles

Explore freely. Sign in to keep your progress.

Your learning sequence

  1. 1 What mypy Checks and How You Are Graded Read
  2. 2 Not solved yet. Fix Your First mypy Errors Practice · Easy
  3. 3 What mypy Strict Mode Turns On Read
  4. 4 Not solved yet. Find the Redundant Flags in a mypy Command Practice · Easy
  5. 5 Bugs That Pass a Strict Type Check Read
  6. 6 Choose Between mypy, Pyright and ty Read
  7. 7 How the Placement Tests Work Read
  8. 8 Not solved yet. Placement 1/6: Make a Generic Class Read-Only Practice · Medium
  9. 9 Not solved yet. Placement 2/6: Match Objects by the Methods They Have Practice · Easy
  10. 10 Not solved yet. Placement 3/6: Turn Parse Errors into Your Own Exception Practice · Medium
  11. 11 Not solved yet. Placement 4/6: Handle a Generator You Can Read Only Once Practice · Easy
  12. 12 Not solved yet. Placement 5/6: Cancel an asyncio Task at Each Stage Practice · Hard
  13. 13 Not solved yet. Placement 6/6: Find Every Module in an Import Cycle Practice · Medium

Check yourself

6 questions · not saved while you're signed out

Use these questions to check your understanding and compare explanations. Your score does not affect track completion.

0 / 6 correct

You submit a solution. Every test passes, and mypy reports one error. What does the result say?

Choose one answer to reveal the explanations. Answers are kept only while this page is open.

Question 1 of 6