test for the knapsack
(self)
| 39 | assert k.knapsack(cap, w, val, c) == 5 |
| 40 | |
| 41 | def test_knapsack(self): |
| 42 | """ |
| 43 | test for the knapsack |
| 44 | """ |
| 45 | cap = 50 |
| 46 | val = [60, 100, 120] |
| 47 | w = [10, 20, 30] |
| 48 | c = len(val) |
| 49 | assert k.knapsack(cap, w, val, c) == 220 |
| 50 | |
| 51 | def test_knapsack_repetition(self): |
| 52 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected