Software Testing / Learning brief

Tom cooks the same recipe in Python

What this means in plain language

Leo's team writes tests in Python. Tom has only seen TypeScript. He finds that the steps stay the same, and the names, the runner and the flags change, like a familiar recipe in a new kitchen.

Understand the full idea, step by step

A good cook can follow a cake recipe in any kitchen. The oven has new knobs and the bowls are in other cupboards. The steps are the same.

Tom is about to find the same thing. His tests for Daily List, a to-do list app, are in TypeScript. Leo's team uses Python, and Tom must write the same tests there. Playwright is a free tool that drives a real web browser, and it speaks Python too.

PLAIN WORDS · 2 in this section
typescript
JavaScript with added labels for the kinds of data
playwright
a free Microsoft tool that drives a browser for tests

Evidence & review

REVIEWED 2026-10-18

The date on this lesson is when it went up on Payments Signal, not when its material was written — most of these were brought across from an earlier catalogue in a single run, which is why so many of them share a date. What the lesson says about the world is dated by the review above and by the sources below it.

Playwright with Python and pytest as taught in this academy, with an invented app and invented people. Playwright changes often, so check the current reference.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Sources were seen only as search excerpts, and no real run was made. The kitchen is a teaching picture.

Sources for this brief — 6 sources
  1. Market practice

    Pytest plugin reference (Playwright documentation for Python) ↗ — Microsoft (Playwright) · The plugin gives a page fixture, a browser_name fixture and browser flags; --headed shows the browser, --browser picks one and can be repeated, and the options can be set in pytest.ini (search excerpt, page not opened)

    Says the plugin gives a page fixture (a new page for each test), a browser_name fixture and is_chromium, is_firefox and is_webkit flags; says --headed shows the browser, --browser picks chromium, firefox or webkit and can be repeated; says the options apply only to the default browser, context and page fixtures and can be set in pytest.ini with addopts. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    Get started (pytest documentation) ↗ — pytest development team · pytest finds test functions that start with test_ in files named test_.py or _test.py, and a plain assert is enough (search excerpt, page not opened)

    Says pytest finds test functions whose names start with test_ in files named test_.py or _test.py, and that a plain assert statement is enough because pytest reports the values behind a failed assert. Official language or tool documentation. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    How to parametrize fixtures and test functions (pytest documentation) ↗ — pytest · A test function can be run with many sets of values by marking it with parametrize (registry source; search excerpt, page not opened)

    Says the parametrize marker defines several argument sets so one test function runs once per set, and that fixtures can also be parametrized. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Running tests across multiple CPUs (pytest-xdist documentation) ↗ — pytest-xdist · The pytest-xdist plugin spreads tests across several processes (registry source; search excerpt, page not opened)

    Explains how a plugin spreads tests across worker processes, with modes that send tests to any free worker or keep tests of one file or scope together on the same worker. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal

    This site's own simplified teaching models. · Checked 2026-07-12

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

  6. Implementation-specific

    How to use fixtures (pytest documentation) ↗ — pytest development team · Handling errors for yield fixture and Safe fixture structure, primary body opened 22 October 2026.

    How pytest handles setup failures, post-yield cleanup and cleanup of earlier completed fixtures. · Checked 2026-10-22

    Primary page opened on the access date. Read the sections on yield errors and safe cleanup. Tool behavior only; no numbered release or guarantee that cleanup always succeeds is claimed.

Learn this properly

START HEREPlaywright with Python and pytestThe same Daily List test written in Python: install the pytest plugin, get a page for free, and learn the few names that change from the TypeScript version.Opens at L0 Explain simply · about 18 min

Related briefs

Tom writes the recipe card

Tom writes a high-level and a low-level test case for a price rule and checks them against nine criteria. A recipe card and a shopping list show him the difference.

READ BRIEF