def test_knapsack_holds_all_items_except_last(self): assert fractional_knapsack.get_optimal_value(50, [20, 20, 20], [10, 10, 10]) == 25.0
def test_items_without_value(self): assert fractional_knapsack.get_optimal_value(100, [30, 30, 30], [0, 0, 0]) == 0.0
def test_knapsack_holds_all_items(self): assert fractional_knapsack.get_optimal_value(100, [30, 30, 30], [10, 10, 10]) == 30.0
def test_sample2(self): assert fractional_knapsack.get_optimal_value(10, [30], [500]) == ( 500 / 3)
def test_empty_knapsack(self): assert fractional_knapsack.get_optimal_value(0, [30], [500]) == 0.0
def test_sample1(self): assert fractional_knapsack.get_optimal_value(50, [20, 50, 30], [60, 100, 120]) == 180.0000
def test_sample2(self): assert fractional_knapsack.get_optimal_value(10, [30], [500]) == (500 / 3)
def test_sample1(self): assert fractional_knapsack.get_optimal_value( 50, [20, 50, 30], [60, 100, 120]) == 180.0000