MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / test_easy_case

Method test_easy_case

knapsack/tests/test_knapsack.py:31–39  ·  view source on GitHub ↗

test for the easy case

(self)

Source from the content-addressed store, hash-verified

29 assert k.knapsack(cap, w, val, c) == 0
30
31 def test_easy_case(self):
32 """
33 test for the easy case
34 """
35 cap = 3
36 val = [1, 2, 3]
37 w = [3, 2, 1]
38 c = len(val)
39 assert k.knapsack(cap, w, val, c) == 5
40
41 def test_knapsack(self):
42 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected