Call : (+91) 968636 4243
Mail : info@EncartaLabs.com
EncartaLabs

Python Unit Testing using DocTest

( Duration: 2 Days )

This Python Unit Testing using DocTest training course focuses on doctests, and examines how the doctest module allows the definition of simple python tests within the docstrings in your source code. You will examine what syntax is needed when manually running tests from a Python shell, and how to copy over shells. Next, you will learn to capture the output and use it in your source file, then how to create an executable document for your source. This course demonstrates packaging a readme file, and the tests for a Python module. You will examine the bundling of documentation and tests into a single executable file. You will learn how to Ellipsis directive to address unpredictable outputs. Finally, you will learn to instruct your doctests to ignore whitespace characters within the outputs of a test by using the normalized whitespace directive.

COURSE AGENDA

1

Day 1

  • Discover the key concepts covered in this course
  • Write and execute a test using the doctest module
  • Recognize where doctests can be placed within source code
  • Create a readme file for a Python module which bundles documentation and testing in a single file
2

Day 2

  • Use the ELLIPSIS directive to account for unpredictable output in doctests
  • Use the ELLIPSIS directive to check if the code raises exceptions for incorrect input values
  • Recall how to set doctest to ignore whitespace in the output of tests tests

Encarta Labs Advantage

  • One Stop Corporate Training Solution Providers for over 6,000 various courses on a variety of subjects
  • All courses are delivered by Industry Veterans
  • Get jumpstarted from newbie to production ready in a matter of few days
  • Trained more than 50,000 Corporate executives across the Globe
  • All our trainings are conducted in workshop mode with more focus on hands-on sessions

View our other course offerings by visiting https://www.encartalabs.com/course-catalogue-all.php

Contact us for delivering this course as a public/open-house workshop/online training for a group of 10+ candidates.

Top
Notice
X