Ad
  • Custom User Avatar

    @danarters,

    This kata seems familiar but I couldn't find a duplicate after a quick search. Here are a few suggestions in the mean time!

    • Typo in the description: skippped -> skipped

    • It looks like you accidentally reversed the order of the arguments in the tests. It just messes up the error message {actual} should equal {expected}.

    • (Optional) The Example Test Cases seem a bit over-complicated. You don't really need to shuffle those lists every time they are run. They could be easily simplified:

      test.assert_equals(sort_ranks(
          ['3', '1', '10', '6', '2', '4', '5', '9', '7', '8']),
          ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'])
      test.assert_equals(sort_ranks(
          ['1.1.1.1', '1', '1.1', '1.1.1']), ['1', '1.1', '1.1.1', '1.1.1.1'])
      test.assert_equals(sort_ranks(
          ['2', '1.1', '1', '1.2']), ['1', '1.1', '1.2', '2'])
      
    • (Optional) There is also a fair bit of repetition in your main Test Cases. It could be cleaned up quite easily.

    Thanks!