Well, I'm asking 3 years old question
This comment is hidden because it contains spoiler information about the solution
Such a beautiful 7 kyu kata. Thanks!
You can keep old solutions valid by using these lines at the top of the test cases:
age = Age
The method is now OK (assert_equals), but the order is (still) wrong -- the correct usage is mentioned above:
# actual = user's result
# expected = correct result
python: do not use test.expect unless you provide a useful message. => use test.assert_equals(actual, expected)
The tests seem to be OK. As written above, you might have a float vs. int issue, depending on the python version you used.
If you eat 2 cakes on the first move, your opponent can not eat 2 on the second move.
Neat solution! :)
Thanks (and don't forget to upvote me :p): I think that with so much time spent doing test, it becomes kinda of a habit to prepare your code for edge test cases, no matter what.
I still have to figure out if that is a mostly positive thing or not ;)
Great solution. Most of the other solutions don't handle the empty string.
Some tests fail on Run Tests due to floating point division errors (8.9999... vs 9), even though the kata says not to worry about this. When I actually submit to the server, though, my solution passes. This seems a little inconsistent.