rkr1958
Posts: 20923
Joined: 5/21/2009 Status: online
|
To date I've executed four unit tests on the MWIF_Utilities_01.py class. The beauty, or power, of using a controller to run these tests is that I can re-run past in addition to new unit tests on this class as it develops. Re-running past and comparing to previous units test runs will help minimize breakage as this class evolves (i.e., code additions and changes are made). Below is the log file from the last executing of the unit test controller. I will in the following posts cover in more detail each of these unit tests. UT.log ====================================================================================================== Unit Test: UT_001 date and time (start): 07/22/2020, 19:55:28 Read in game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT.GAM Wrote out game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT_001.GAM date and time (finished): 07/22/2020, 19:55:28 ====================================================================================================== ====================================================================================================== Unit Test: UT_002 date and time (start): 07/22/2020, 19:55:28 Read in game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT.GAM Changed verison from 3.1.0.7 to 3.1.0.5 Wrote out game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT_002.GAM date and time (finished): 07/22/2020, 19:55:28 ====================================================================================================== ====================================================================================================== Unit Test: UT_003 date and time (start): 07/22/2020, 19:55:28 Read in game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT.GAM move_counters. Success. Found unit. mc[country,type,year,id key,id,status,x,y]= Ita,Inf HQ,1934,0,Badoglio,0,60, successfully moved counter from x,y= 60,42 to x,y= 61,52. changed counter status to flipped and out-of-supply. move_counters. Success. Found unit. mc[country,type,year,id key,id,status,x,y]= Italian,light aa,1939,0,20mm,0,60, successfully moved counter from x,y= 60,42 to x,y= 61,52. move_counters. ERROR. Unable to move and/or change counter status. mc[country,type,year,id key,id,status,x,y]= Italian,small aa,1939,0,20mm,0,60, move_counters. ERROR. Unable to move and/or change counter status. mc[country,type,year,id key,id,status,x,y]= German,light aa,1939,0,20mm,0,60, move_counters. Success. Found unit. mc[country,type,year,id key,id,status,x,y]= German,MIL,1936,0,LEIPZIG,99,56, successfully moved counter from x,y= 56,27 to x,y= 61,52. changed counter status to flipped and in-supply. move_counters. Success. Found unit. mc[country,type,year,id key,id,status,x,y]= UK,CVL,1913,0,eagle,99,46, successfully moved counter from x,y= 46,26 to x,y= 38,22. move_counters. Success. Found unit. mc[country,type,year,id key,id,status,x,y]= NED,Convoy,1936,2,1,99,102, successfully moved counter from x,y= 102,0 to x,y= 44,30. move_counters. Success. Found unit. mc[country,type,year,id key,id,status,x,y]= Commonwealth,Oil,1936,2,2,99,47, successfully moved counter from x,y= 47,26 to x,y= 42,26. move_counters. Success. Found unit. mc[country,type,year,id key,id,status,x,y]= German,u-boat,1939,1,4838,10,39, successfully moved counter from x,y= 39,22 to x,y= 45,34. changed counter status to organized and in-supply. Wrote out game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT_003.GAM date and time (finished): 07/22/2020, 19:55:28 ====================================================================================================== ====================================================================================================== Unit Test: UT_004 date and time (start): 07/22/2020, 19:55:28 Read in game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT.GAM change_hex_control. following hexes changed to germany control (cid= 79): change_hex_control. ERROR. invalid coordinate pair. x,y= 5000,45. change_hex_control. ERROR. invalid coordinate pair. x,y= 0,-1. [60,40],[60,41],[61,40],[61,41],[61,42],[62,42],[62,41], change_hex_control. following hexes changed to japanese control (cid= 49): [81,140],[84,140],[89,141], change_hex_control. ERROR. invalid country input following hc line not processed. Note. hc[0]=invalid country input. bad_country_input,0,0,0,0, Wrote out game file: C:\Users\rkrun_000\Documents\Python\MWIF\game_files\UT_004.GAM date and time (finished): 07/22/2020, 19:55:28 ======================================================================================================
_____________________________
Ronnie
|