예제 #1
0
 def test_first_fit(self):
     sets = bp.first_fit(self.items, self.bins, self.cap)
     self.assertEqual(sets, self.empty)
예제 #2
0
 def test_first_fit(self):
     sets = bp.first_fit(self.items, self.bins, self.cap)
     sets[0].sort()
     self.assertEqual(sets, self.expected)
예제 #3
0
 def test_first_fit(self):
     sets = bp.first_fit(self.items, self.bins, self.cap)
     self.expected = [[8, 2], [5, 4, 1], [7], [6], []]
     self.assertEqual(sets, self.expected)