Skip to content

Commit b6b2e18

Browse files
Update test_knapsack.py
1 parent b10a7fc commit b6b2e18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

knapsack/tests/test_knapsack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_knapsack(self):
4646
val = [60, 100, 120]
4747
w = [10, 20, 30]
4848
c = len(val)
49-
self.assertEqual(k.knapsack(cap, w, val, c, False), 220)
49+
assert k.knapsack(cap, w, val, c, False) == 220
5050

5151
def test_knapsack_repetition(self):
5252
"""
@@ -56,7 +56,7 @@ def test_knapsack_repetition(self):
5656
val = [60, 100, 120]
5757
w = [10, 20, 30]
5858
c = len(val)
59-
self.assertEqual(k.knapsack(cap, w, val, c, True), 300)
59+
assert k.knapsack(cap, w, val, c, True) == 300
6060

6161

6262
if __name__ == "__main__":

0 commit comments

Comments
 (0)