Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Order of a dictionary is not a generally defined thing, and various implementations of dictionary can handle ordering of items in different ways, especially across languages. There are even dictionaries which can iterate over collected items in different order potentially every time. Description should explain what is expected to be the last item in potentially unordered container, or to guarantee that always an ordered implementations of dictionary will be used, otherwise translations will turn this kata into a mess. It will break terribly after translation into Java or C# by an unaware translator.
This kata would not work even in earlier versions of Python, which guarantees order of insertion ìn a dictionary since, IIRC, 3.6?
100 random tests should be enough (exceeding it will only increase the buffer workload)
there should be example test cases
(PS, I don't think there's a duplicate kata that teaches such concept or built-in function)
Assertions are supposed to be inside of
test.it
.Even if it may happen to work, I don't think the test framework is safe to use with multiprocessing. It looks like the calls to
assert_equals
(=> file output) are unsynchronized.The reference solution is destructive, but it's not from the description if modifying the dictionary is allowed.
New test framework should be used.
You need to write tests for your kata before publishing it ;-)