Example #1
0
 def test_boundary(self):
     first = ('A', 5)
     second = ('B', 5)
     self.assertEquals('B', weighted_choice_by_val([first, second], 0.5))
 def test_boundary(self):
     first = ('A', 5)
     second = ('B', 5)
     self.assertEquals('B', weighted_choice_by_val([first, second], 0.5))
Example #3
0
 def test_high_limit(self):
     first = ('A', 5)
     second = ('B', 5)
     self.assertEquals('B', weighted_choice_by_val([first, second], 1.0))
 def test_high_limit(self):
     first = ('A', 5)
     second = ('B', 5)
     self.assertEquals('B', weighted_choice_by_val([first, second], 1.0))