Пример #1
0
 def test_empty_values(self):
     self.assertEquals(0, fill_bag(10, [], []))
Пример #2
0
 def test_zeroweight(self):
     self.assertEquals(0, fill_bag(0, [1, 2], [5, 5]))
Пример #3
0
 def test_someitems(self):
     self.assertEquals(
         60, fill_bag(10, [20, 5, 5, 10, 40, 15, 25],
                      [1, 2, 2, 3, 8, 7, 4]))
Пример #4
0
 def test_tooheavy(self):
     self.assertEquals(0, fill_bag(10, [10, 20], [15, 25]))
Пример #5
0
 def test_allitems(self):
     self.assertEquals(70, fill_bag(10, [20, 5, 40, 5], [1, 2, 2, 3]))