Skip to content

cauliyang/workshop_next_step_in_python_05052025

Repository files navigation

Workshop: The Next Step in Python - Testing with pytest

Date: May 5, 2025

Description

Want to make your code more reliable and easier to maintain? Writing tests is a crucial skill for any Python coder. In this workshop, you'll learn the fundamentals of testing in Python, including how to write unit tests, use pytest, and implement test-driven development principles. We'll cover best practices for writing effective tests and how to use testing tools to catch bugs.

Prerequisites

Participants should be familiar with Python at the level of the Python Fundamentals Bootcamp, another introductory Python workshop, or be a self-taught Python coder. Basic knowledge of Python functions and modules is required.

Workshop Structure (1 hour)

  1. Introduction to Testing (10 min)
  2. Getting Started with pytest (15 min)
  3. Writing Effective Test Cases (15 min)
  4. Test-Driven Development (TDD) in Practice (15 min)
  5. Q&A and Wrap-up (5 min)

Materials

Workshop slides and code examples are available in this repository:

  • presentation.qmd - Quarto presentation slides
  • examples/ - Directory containing code examples and exercises
  • solutions/ - Directory containing solution code for exercises

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •