Skip to content

nuitrcs/testing_with_pytest

 
 

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 88.3%
  • Jupyter Notebook 8.7%
  • Python 3.0%