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

Udemy

350+ Exercises - Python Programming Mega Pack - Unit Tests

via Udemy

Overview

Level up Your Python Skills with 350+ Unit Test Exercises - Master the Art of Testing in this Mega Pack!

What you'll learn:
  • solve over 350 exercises in Python and unit testing
  • deal with real programming problems
  • work with documentation
  • guaranteed instructor support

This course is an in-depth, hands-on guide to unit testing in Python. This course is aimed at both beginners who want to solidify their knowledge of Python and experienced developers who want to enhance their testing skills.

With over 350 exercises, this course thoroughly covers the unittest module, one of Python's built-in libraries designed for testing. By working through these exercises, students will gain a practical understanding of unit testing in Python and the importance of test-driven development.

The course starts with the fundamentals of unit testing, including writing simple test cases and understanding the role of assertions. It then progressively moves into more complex areas such as setup and teardown methods, test suites, and mock objects. Throughout the course, students will learn to write robust and effective test cases, crucial for maintaining large codebases and ensuring software quality.

Each exercise is designed to reinforce the concepts learned in the course and provide practical experience. The course also includes solutions to all exercises, allowing students to compare their solutions and gain insights into different approaches.

By the end of this course, students will have a deep understanding of unit testing in Python, enabling them to write comprehensive test cases and enhance software quality in their future projects. This knowledge can lead to improved job prospects and performance in professional settings.


Unit Testing: Ensuring Code Quality One Unit at a Time

Unit testing is a software testing technique that focuses on verifying the functionality of individual components or functions in isolation. By writing and executing small, repeatable tests, developers can detect bugs early, ensure code reliability, and support future code changes with confidence. Unit testing is a fundamental practice in test-driven development and continuous integration workflows.


unittest: Built-in Testing for Reliable Python Code

The unittest framework is Python’s standard library for writing and running unit tests. It provides a structured approach to test automation with features like test case organization, test discovery, setup and teardown methods, and detailed reporting. By enabling developers to validate code functionality and catch regressions early, unittest plays a crucial role in ensuring code quality and maintainability.

Syllabus

  • Tips
  • Starter
  • -----BASICS-----
  • print() function
  • Calculations
  • Slicing
  • Data Types
  • Strings
  • ----- DATA STRUCTURES -----
  • Sets
  • Tuples
  • Lists
  • Dictionaries
  • ----- PROGRAM FLOW CONTROL -----
  • if statement
  • for loop
  • break statement
  • continue statement
  • while loop
  • Exception handling
  • -----INPUT/OUTPUT-----
  • Reading files
  • Saving to file
  • -----FUNCTIONS-----
  • Built-in functions
  • Defining your own functions
  • Lambda expression
  • Generators
  • ----- TRANSFORMATION OF DATA STRUCTURES -----
  • Set Comprehension
  • List Comprehension
  • Dict Comprehension
  • ----- BUILT-IN PACKAGES -----
  • Built-in packages
  • Summary
  • ---- UNIT TESTS -----
  • assert statement
  • Unittest framework - basics
  • Framework unittest - assertions
  • Skipping tests
  • Test fixtures
  • Function testing
  • Class testing
  • Parameterized tests
  • Mocking
  • Market Basket Project
  • Customers Project
  • TDD - Test Driven Development
  • Configuration (optional)
  • Bonus

Taught by

Paweł Krakowiak

Reviews

4.6 rating at Udemy based on 31 ratings

Start your review of 350+ Exercises - Python Programming Mega Pack - Unit Tests

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.