From d010de0fe5cac0c77fec89f5bb447a78d52c6db4 Mon Sep 17 00:00:00 2001 From: zimmersandro Date: Tue, 10 Mar 2026 16:38:11 +0100 Subject: [PATCH] test: test cases for kata 'Who has the most money' --- tests/codewars/test_who_the_most_money.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/codewars/test_who_the_most_money.py diff --git a/tests/codewars/test_who_the_most_money.py b/tests/codewars/test_who_the_most_money.py new file mode 100644 index 0000000..f7aeeff --- /dev/null +++ b/tests/codewars/test_who_the_most_money.py @@ -0,0 +1,15 @@ +from src.codewars.kata_who_the_most_money import Student, most_money + + +def test_most_money(): + phil = Student("Phil", 2, 2, 1) + cam = Student("Cameron", 2, 2, 0) + geoff = Student("Geoff", 0, 3, 0) + + assert most_money([cam, geoff, phil]) == "Phil" + + phil = Student("Phil", 2, 2, 2) + cam = Student("Cameron", 2, 2, 2) + geoff = Student("Geoff", 2, 2, 2) + + assert most_money([cam, geoff, phil]) == "all"