Udemy

150+ Exercises - Unit tests in Python - unittest framework

Enroll Now
  • 5,946 Students
  • Updated 3/2025
  • Certificate Available
4.4
(134 Ratings)
CTgoodjobs selects quality courses to enhance professionals' competitiveness. By purchasing courses through links on our site, we may receive an affiliate commission.

Course Information

Registration period
Year-round Recruitment
Course Level
Study Mode
Duration
1 Hour(s) 34 Minute(s)
Language
English
Taught by
Paweł Krakowiak
Certificate
  • Available
  • *The delivery and distribution of the certificate are subject to the policies and arrangements of the course provider.
Rating
4.4
(134 Ratings)
1 views

Course Overview

150+ Exercises - Unit tests in Python - unittest framework

Master Unit Testing in Python with 150+ Hands-On Exercises - Harness the unittest Framework for Robust Code Testing!

This course is an exhaustive, hands-on learning resource aimed at mastering the unittest framework in Python. Unit testing is an integral part of software development, and this course gives you the tools to write effective, robust tests to ensure your code performs as expected.

The unittest module in Python is a built-in library for testing individual units of source code, like functions or methods. Understanding how to implement unit tests is essential for writing reliable, bug-resistant software, and helps foster a deep understanding of your code and its behavior.

This course is divided into sections, each focusing on a different aspect of the unittest framework. Topics covered include creating test cases, executing tests, and using various assertion methods to verify test outcomes. You will learn about setup and teardown methods, how to group tests using test suites, and how to use mock objects for isolating your tests.

Each section comes with a multitude of exercises designed to apply and reinforce the principles learned. The exercises cover a variety of real-world scenarios, and are accompanied by comprehensive solutions to assist in understanding the application of concepts.

This course is perfect for Python developers wanting to bolster their skills in writing unit tests, thereby enhancing the reliability of their code. Whether you're a novice programmer or an experienced developer, this course offers an invaluable learning journey in software testing.


unittest: Ensuring Code Reliability Through Automated Testing

unittest is a built-in Python module that provides a framework for writing and running tests to verify the correctness of your code. It supports test automation, sharing of setup and shutdown code, aggregation of tests into collections, and test discovery. Widely used in software development, unittest helps maintain code quality and catch bugs early in the development cycle.

Course Content

  • 23 section(s)
  • 201 lecture(s)
  • Section 1 Tips
  • Section 2 Starter
  • Section 3 The assert statement
  • Section 4 Unittest framework - basics
  • Section 5 Framework unittest - assertions
  • Section 6 Testing exceptions, errors and warnings
  • Section 7 Skipping tests
  • Section 8 Test fixtures
  • Section 9 Function testing
  • Section 10 Class testing
  • Section 11 Parameterized tests
  • Section 12 parameterized module
  • Section 13 Organizing tests into test suites
  • Section 14 Mocking
  • Section 15 Mocking - advanced examples
  • Section 16 Market Basket Project
  • Section 17 Customers Project
  • Section 18 Bank Account Project
  • Section 19 TDD - Test Driven Development - Part I
  • Section 20 TDD - Test Driven Development - Part II
  • Section 21 Summary Tests
  • Section 22 Configuration (optional)
  • Section 23 Bonus

What You’ll Learn

  • solve 150+ exercises - unittest framework
  • deal with real programming problems
  • work with documentation and Stack Overflow
  • guaranteed instructor support


Reviews

  • S
    Smriti Rastogi
    4.0

    As a begineer in python unittesting this course helped me built fundamentals and taught some solid techniques about mocking , assert statements. Though I think a lit bit of theory as notes is needed at the start of each course to crystal clear concepts.

  • C
    Cyprian Fusi
    5.0

    Great course! Well crafted exercises! It boosted my morals and increased my confidence¬

  • M
    Mateusz Dziewior
    2.5

    Slow learning curve, lot of repetitive exercises. Chapters with mocking was quite interesting but sometimes introduction to new feature was missing and i had to found additional informations outside. Summary Tests was prepared very well with rich explanations but chapters with projects and TDD was again repetitions of the same simple concepts.

  • A
    Adalberto Vazquez Roman
    5.0

    Excellent course! It covers the basics of unittest with a lot of use cases. Would be great to have more complexity for the Python code and examples but in general is great to get started with unittest module

Start FollowingSee all

We use cookies to enhance your experience on our website. Please read and confirm your agreement to our Privacy Policy and Terms and Conditions before continue to browse our website.

Read and Agreed