Unit testing framework 2

1. When a plurality of test when the class (classes are in the same file, py)

The first is the same as a bar to join in

 

 2. The presence of a plurality of classes, each class (multi-file test) in different files

The first: the older method (do not mind using)

The file names one by one over the import

Way before coming in with a load

 

 The second 

 

 

 

 So when py file name used there should be a rule

3. Multi-level file (more than one folder below the folder (the folder below as well as folders and files ... py) and multiple py file) 

Can __init__ .py files in each sub-folder plus an empty

Put __init__ .py file can be found  

Others use the same second point

Example 4. Use default execution order according ascall (not in accordance with the written order)

 12-37.34

Guess you like

Origin www.cnblogs.com/wulinmiao/p/11544021.html