The tests require attack to be a method while the examples in the description suggest that it's an attribute.
The purpose of this kata is to disallow tampering with instance attributes, so you can forget about removing those tests.
It is fine! But, it is also good to check input validation. Let's say I call your function with an undefined input or with a non valid input
I knew it! This could be done by simply chaining string methods in a single line.
Couldn't hack it though, my solution ended up being a big procedural mess.
If you don't know https://regex101.com/ it's an awemsome tool where you can test your regexp and also, find quick references, quizz etc.
This comment is hidden because it contains spoiler information about the solution
Dictionary's name in Python should be in snake case.
For broken clojure version, set the namespace to (ns share-price.core)
Needs random tests
I've edited the tests (didn't have edit rights two years ago). They should be more robust now.
The String result remains, though, since that's in the kata's description. *sigh*
Agreed, can somebody fix the Quickcheck tests here? They are extremely brittle and force the player to stumble upon the same implementation by trial and error, without really learning anything interesting. The roundingSol problem mentioned by bkaes means that the player also does not get useful feedback during that trial and error process.