Back to Browse

02. Pytest: Test Discovery, Command Line Options, Setup & Teardown

68 views
Jun 14, 2025
35:32

📌 Video Title: Pytest: Test Discovery, Command Line Options, Setup & Teardown 🎥 Description: In this hands-on Pytest tutorial, we dive deep into writing and organizing test cases using both test functions and test classes. You'll learn how Pytest discovers tests, how to use various command-line options to control your test execution, and how to assert exceptions effectively. We also explore Pytest's powerful setup and teardown capabilities, demonstrating how to use them at the method, class, and module levels to manage test preparation and cleanup efficiently. ✅ Topics Covered: • Test discovery mechanism in Pytest • Organizing tests with functions and classes • Running tests using Pytest CLI options • Using pytest.raises to test exceptions • Setup and teardown with setup_method, setup_class, and setup_module 🎯 What You’ll Learn in This Video ⏳ Timestamps: 📌 00:00:00 – Introduction 📌 00:00:48 – Organizing tests with functions 📌 00:06:40 – Exploring different command-line options for test execution 📌 00:17:28 – Testing exceptions with pytest.raises 📌 00:21:20 – Organizing tests into test classes 📌 00:23:17 – Understanding setup and teardown at method, class, and module levels 📌 00:34:57 – Summary 🔖 Hashtags: #Pytest #PythonTesting #TestAutomation #SoftwareTesting #PythonForTesters #AutomationWithPython #UnitTesting #PytestTutorial #SetupTeardown #CommandLineTesting #QA #TestDiscovery #PythonTips #TestDrivenDevelopment #TDD Join this channel to get access to perks: https://www.youtube.com/channel/UC77I-kSqjrTV0J4yeGjbxCg/join

Download

0 formats

No download links available.

02. Pytest: Test Discovery, Command Line Options, Setup & Teardown | NatokHD