Course details

Python Unit Testing: An Introduction to Python's unittest Framework

Python Unit Testing: An Introduction to Python's unittest Framework


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description

This 8-video course explores the unit-test framework in Python. To take this course, you should have experience in Python programming and the use of the Linux shell. The unit-test framework (also known as PyUnit) is modeled on JUnit and simplifies the automation of tests for Python applications. You will learn to use the unit-test framework to define tests for your application source code to ensure that it behaves in a specified manner. In this course, learners will write a sample test, and then expand the test scripts to include multiple tests. You will learn how to sequence the execution of tests in scripts, and how to filter out tests which do not require a specific run. Next, you will learn how to pass the output of test executions to identify the results of your tests, and how to diagnose test failures. You will learn how to run specific tests from among multiple tests in your scripts. Finally, this course demonstrates how to skip the execution of tests by using the skip decorator.



Expected Duration (hours)
0.8

Lesson Objectives

Python Unit Testing: An Introduction to Python's unittest Framework

  • discover the key concepts covered in this course
  • install the latest version of Python and write a test using the unittest framework
  • define and execute multiple tests within a single test case
  • recognize the effect of the test names on the execution of test methods
  • pick individual tests from a script which need to be executed
  • identify the various assert functions available in unittest and their specific use cases
  • use the different decorators available in unittest to conditionally and unconditionally skip specific tests
  • summarize the key concepts covered in this course
  • Course Number:
    it_pyutpydj_01_enus

    Expertise Level
    Intermediate