Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Python unit testing - pytest fixtures
Play lesson

Python 3 Programming Tutorials for Beginners - Python unit testing - pytest fixtures

5.0 (1)
30 learners

What you'll learn

This course includes

  • 6.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

This tutorial covers a powerful feature in pytest framework called fixtures. It leverages the dependency injection concept for setup and teardown of your unit tests. It is preferred over traditional xunit style setup/teardown methods. The video explains demonstrating problem, issues with test case in the case of code repetition, creating expensive DB connection in every test case and solving problems with fixtures. Topics that are covered in this Python Video: 0:00 Overview 0:16 Demonstrating problem 3:25 Issues with test case 1. code repetition 2. creating expensive DB connection in every test case 4:32 Setup and teardown methods 7:05 Solving problem with fixtures 9:24 fixtures leverage a concept Dependency injection Do you want to learn technology from me? Check https://codebasics.io/ for my affordable video courses. You can find code used in this tutorial here: https://github.com/codebasics/py/tree/master/unittesting_pytest/fixtures Next Video: Python unit testing - pytest parameters: https://www.youtube.com/watch?v=2EGgtlf7BN0&list=PLeo1K3hjS3uv5U-Lmlnucd7gqF-3ehIh0&index=39 Website: https://codebasics.io/ Facebook: https://www.facebook.com/codebasicshub Twitter: https://twitter.com/codebasicshub

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

FAQs

Course Hive
Download CourseHive
Keep learning anywhere