def test_first_fit(self): sets = bp.first_fit(self.items, self.bins, self.cap) self.assertEqual(sets, self.empty)
def test_first_fit(self): sets = bp.first_fit(self.items, self.bins, self.cap) sets[0].sort() self.assertEqual(sets, self.expected)
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)