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

Python 3.0+    |    Intermediate
  • 8 Videos | 53m 3s
  • Includes Assessment
  • Earns a Badge
Likes 20 Likes 20
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

  • Playable
    1. 
    Course Overview
    2m 24s
    UP NEXT
  • Playable
    2. 
    An Introduction to the unittest Framework
    9m 25s
  • Locked
    3. 
    Running Multiple Tests with unittest
    7m 23s
  • Locked
    4. 
    Naming the Test Function
    5m 59s
  • Locked
    5. 
    Selection of Specific Tests to Run
    5m 22s
  • Locked
    6. 
    The Assert Functions
    8m 48s
  • Locked
    7. 
    Skipping Tests
    9m 22s
  • 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 of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Likes 159 Likes 159  
Likes 348 Likes 348