istranin.dev

Field notes · Python · AI · delivery

Pytest course

Building and testing software.

Practical notes on Pytest, AI engineering, team habits, legacy systems, and the work required to make software safe to change.

Published notes · recently updated 011 entries
001

OpenAI Codex Tutorial: Free Full Course with Python

A free, 3-hour, project-based OpenAI Codex tutorial for Python developers. Build, test, deploy, and review a real app with Codex.

OpenAI CodexCodex CLIAI Coding AgentsPythonModel Context ProtocolCI/CD 17 min read
002

Pytest Hooks Tutorial: 5 Practical Examples for Python Tests

Learn where pytest hooks fit, when to choose a hook over a fixture, and how to customize collection, reporting, and test runs with working examples.

pytestPython testingpytest hookstest automationplugin development 12 min read
003

Python Unit Testing Best Practices: 10 pytest Rules That Scale

Write Python unit tests that survive refactoring. Use pytest to protect behavior, choose useful cases, control dependencies, and keep the suite fast.

Python unit testingpytesttesting best practicestest designtest automation 13 min read
004

Test-Driven Development in Python with pytest: A Practical Guide

Use pytest to practice red-green-refactor on a realistic inventory rule. Write each failing test first, add only enough code, and refactor safely.

Test-driven developmentpytestPython testingred-green-refactorunit testing 13 min read
005

GitHub Actions Python Testing: A Complete pytest CI Guide

Build a pytest workflow in GitHub Actions with dependency caching, multiple Python versions, branch coverage, reports, and a stable merge check.

pytestGitHub ActionsPython testingCI/CDcode coverage 14 min read
006

How to Test a LangGraph Agent with pytest (Without API Calls)

Build a small tool-using LangGraph workflow and test its model, tool, and failure path with pytest-mock, without calling a live LLM or external service.

LangGraphpytestPython testingAI agentsmocking 12 min read
007

FastAPI Testing with Pytest: A Practical API Testing Tutorial

Build a small FastAPI endpoint, test its success and validation contracts with pytest and TestClient, and learn what a useful API test should prove.

API testingFastAPIpytestPython testingbackend testing 11 min read
008

Pytest for Beginners: Write and Run Your First Python Test

If you know how to write a Python function, you know enough to start testing. Build, run, and debug your first pytest test without creating a package.

pytestPython testingunit testingbeginner tutorial 10 min read
009

AI Coding Agents: Production Reliability Matters

AI coding agents make implementation cheap, but reliable systems still require contracts, TDD, layered tests, disciplined reviews, and useful documentation. Here is a production-minded workflow you can apply with any agent.

AI coding agentsproduction reliabilitytest-driven developmentsoftware testingsite reliability engineeringagent skills 17 min read
010

How to Guide AI Coding Agents to Write Better pytest Tests

AI agents often test the line they changed instead of the behavior a unit owns. Add durable testing instructions, enforce a pytest coverage gate, and review generated tests against stable contracts.

pytestAI coding agentsPython testingagent instructionstest designcode coverage 14 min read
011

How to Onboard a Python Team to Testing with Pytest

Learn how a 15-developer Python team used shared practice, legacy-code pinch points, and CI to turn pytest into an everyday engineering habit.

pytestPython testingteam onboardinglegacy codeCI/CD 9 min read