Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

freeCodeCamp

Pytest Tutorial – How to Test Python Code

via freeCodeCamp

Overview

Explore the powerful pytest framework for Python testing in this comprehensive tutorial. Gain a deep understanding of pytest's features, best practices, and the nuances of writing effective tests. Begin with an introduction to pytest, then progress through creating your first tests and implementing class-based tests. Dive into advanced concepts such as fixtures, marking and parametrizing tests, and mocking. Finally, discover how to leverage ChatGPT to streamline your test writing process. Master the art of Python testing and elevate your development skills with this hands-on learning experience.

Syllabus

Introduction
Our First Tests
Class-based Tests
Fixtures
Mark & Parametrize
Mocking
Testing with ChatGPT

Taught by

freeCodeCamp.org

Reviews

Start your review of Pytest Tutorial – How to Test Python Code

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.