Skip to main content

Chapter 46 Quiz

Before taking the quiz, verify that you can do each of these without looking at the lessons:

  • Explain the TDG loop: Name all five steps (Specify, Check types, Generate, Verify, Read) and describe what each one does
  • Write a stub: Create a function with type annotations and an ellipsis body that passes pyright
  • Write test assertions: Define expected input-output behavior with two assert statements
  • Prompt AI correctly: Use the pattern "Implement the function. Do not modify the tests." and explain why the second sentence matters
  • Read a failure: Identify the > line and E line in pytest output and explain the mismatch

If any feel uncertain, revisit the specific lesson before continuing.

Test your understanding of the Test-Driven Generation loop, function specifications, and AI verification by solving real-world scenarios.

Checking access...