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

Python    |    Intermediate
  • 8 videos | 50m 3s
  • Includes Assessment
  • Earns a Badge
Rating 4.6 of 52 users Rating 4.6 of 52 users (52)
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.

WHAT YOU WILL LEARN

  • 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

IN THIS COURSE

  • 2m 24s
  • 9m 25s
    Learn how to install the latest version of Python and write a test using the unittest framework. FREE ACCESS
  • Locked
    3.  Running Multiple Tests with unittest
    7m 23s
    In this video, you will define and execute multiple tests within a single test case. FREE ACCESS
  • Locked
    4.  Naming the Test Function
    5m 59s
    Upon completion of this video, you will be able to recognize the effect of the test names on the execution of test methods. FREE ACCESS
  • Locked
    5.  Selection of Specific Tests to Run
    5m 22s
    In this video, find out how to pick individual tests from a script which need to be executed. FREE ACCESS
  • Locked
    6.  The Assert Functions
    8m 48s
    In this video, you will learn how to identify the various assert functions available in unittest and their specific use cases. FREE ACCESS
  • Locked
    7.  Skipping Tests
    9m 22s
    Learn how to use the different decorators available in unittest to skip specific tests conditionally and unconditionally. FREE ACCESS
  • Locked
    8.  Course Summary
    1m 21s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 4.5 of 49 users Rating 4.5 of 49 users (49)
Journey Python 3
Rating 4.8 of 22 users Rating 4.8 of 22 users (22)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.3 of 111 users Rating 4.3 of 111 users (111)
Rating 4.6 of 184 users Rating 4.6 of 184 users (184)
Rating 4.8 of 42 users Rating 4.8 of 42 users (42)