b, -buffer Buffer stdout and stderr during tests
c, -catch Catch Ctrl-C and display results so far f, -failfast Stop on first fail or error locals Show local variables in tracebacks h, -help show this help message and exit What command will list all of the command line options for unittest shown in the following output? :~/labs/devnet-src$ python3 -m unittest -h Methods whose names start with the letters test_ informs the test runner about which methods are tests. How does the test runner know which methods are a test? A test runner can be a graphical interface but, in this lab, you will use the command line to run tests. The unittest module provides a base class, TestCase, which may be used to create new test cases.Ī test runner is responsible for executing tests and providing you with results. What unittest class do you use to create an individual unit of testing? You will need that knowledge or documentation to answer questions in this part. Search for it on the internet to find the documentation at. If you are not familiar with this framework, study the “Python unittest Framework” to familiarize yourself. Python provides a Unit Testing Framework (called unittest) as part of the Python standard library. Part 2: Explore Options in the unittest Framework If you have already completed that lab, launch the DEVASC VM now.
If you have not already completed the Lab – Install the Virtual Machine Lab Environment, do so now.
Unit tests examine independent units of code, like functions, classes, modules, and libraries.