Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
What automated tests are and how to run them card 6 of 6

Known input, expected output, one command

builds on: Command output and exit codes, How a code project is laid out
A test runs your code on a known input and checks the answer. Run the whole suite from the project root with the project's one command (`pytest`, `npm test`, …). Then read the bottom summary line and the exit code. For each failure, compare what came back (the `E` line) with what the test expected. A pass only covers what the tests actually check.
Terms on this card
test
A small piece of code that runs part of your program with a known input and checks that the output is what it should be.
pytest
The most common test runner for Python projects. You run it by typing `pytest` in the project root.
npm test
The usual command to run the tests of a JavaScript project. It runs whatever test command the project's config defines.
project root
The top-level folder of a project, the one containing `.git`. Test commands are normally run from here.
exit code
A number a command reports when it finishes. 0 means success; anything else means failure.
Learn this step by step on Bytewise
Lesson goal: Explain a test as code that runs your code with known inputs and checks the output. Run a project's test suite with one command and read which tests passed and which failed. · the whole lesson