示例#1
0
 def check_10(self):
     assert bargraph(self.data3, height=50, leftOffset=4, rightOffset=3, valueDivisor=1000) == '3   **************************************************   100.0 %\n'
示例#2
0
 def check_09(self):
     assert bargraph(self.data3, height=50, leftOffset=4, rightOffset=3, valueDivisor=None) == '3   **************************************************   1000\n'
示例#3
0
 def check_07(self):
     assert bargraph(self.data1, height=50, leftOffset=4, rightOffset=3, valueDivisor=1000) == '-7  *   0.1 %\n-6  **   0.6 %\n-5  ******   3.4 %\n-4  ************************   14.1 %\n-3  ********************************************   26.2 %\n-2  ***************************************************   30.3 %\n0   ******************************   17.6 %\n2   ***********   6.2 %\n3   ***   1.4 %\n4   *   0.1 %\n'
示例#4
0
 def check_08(self):
     assert bargraph(self.data2, height=50, leftOffset=4, rightOffset=3, valueDivisor=1000) == '-9  *   0.1 %\n-6  **   0.6 %\n-5  **********************************   13.4 %\n-4  **************************   10.1 %\n-3  *****************************************   16.2 %\n-1  ***************************************************   20.3 %\n0   ***********   4.0 %\n1   **********   3.6 %\n4   **************************   10.1 %\n5   *****************************************   16.2 %\n10  *****************************   11.4 %\n'
示例#5
0
 def check_06(self):
     assert bargraph(self.data1, height=40, leftOffset=5, rightOffset=12, valueDivisor=None) == '-7   *            1\n-6   *            6\n-5   *****            34\n-4   *********************            141\n-3   **************************************            262\n-2   ********************************************            303\n0    **************************            176\n2    *********            62\n3    ***            14\n4    *            1\n'