Run a separate embodiment of a method in a python-unittest environment

In the framework of the test unit unittest, you want to recall the green triangle shown in FIG.

 It requires two steps:

1, to determine the operating mode in unittest in the toolbar, if the normal mode, then you can drop down through the lower triangular modify the operating environment:

 

2, import unittest frame code

 

3, the most important point is often overlooked that, when creating the class, the parent must for this: unittest.TestCase

 

Guess you like

Origin www.cnblogs.com/fish-101/p/11278779.html