Ad
  • Custom User Avatar

    I recall I had major difficulties with testing when I created this. I had more exhaustive test cases initially but they didn't work on codewars due to actual issues with codewars' testing framework (this was more than a year ago—maybe it's been improved since). If you want to improve this feel free, I just don't have the time to work on it.

  • Custom User Avatar

    I have not been active and would welcome someone else take over this if it is deemed useful. I just don't have the time.

  • Custom User Avatar

    I believe I've fixed this now.

  • Custom User Avatar

    I hadn't realized that. I put the tests and solutions data into the example test case section, so now it should be OK, I think. Exposing the data like that seems like it's not ideal (I would prefer a way to load test/solution data for testing purposes without exposing it to users, but apparently there's no way to do that.)

  • Custom User Avatar

    I'm not sure what you mean? Can you provide an example?

  • Custom User Avatar

    I haven't had time recently to be active with Kata, but I think the JS translation is fine, and I'd be happy if someone else added more test cases to the Python version.

  • Custom User Avatar

    I'm not sure why short_tests and short_results would not be defined for you. I defined them both in the preloaded section of the Kata, which you don't have access to, but which is run before the example test cases. It's possible that CodeWars has a bug in their back end that isn't running the preloaded code before running your tests.

  • Custom User Avatar

    It's way too easy when we assume that input is unique

    Maybe easy for you, but not for everyone.

    There's nothing about words with more than one vowel

    That's a fair point. The way the problem was originally posed to me, you would really be looking through a dictionary of English words, of which there are no instances of multiple vowel alternations across a set of words. To generalize this type of search problem to other natural languages, or non-natural inpu, one could arbitrarily define what the correct "solution" should be.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Yes, the order does matter, since the tests cases are testing equality of lists of lists. If you sort each solution list it should pass the provided test cases.

  • Custom User Avatar

    I only solved it by introducing a special list class which upon comparison ignores the order of its elements.

    This is effectively using set-wise comparison. I can alter the test cases to use set-wise comparison, but the description clearly states that you should be returning a list of lists (not a list of set objects). If you sort each of your solution sets, e.g., [sorted(s) for s in solutions], the tests should pass.

    It might be preferable to create a test suite that does set-wise comparison, but since Python's built-in list and set types are not hashable, I'm actually not sure how to easily write such tests.

    Edit: I made an update to the description specifying exactly how the solutions should be ordered.

  • Custom User Avatar

    My solution passes the provided test case, but when I submit, I get an 'Unknown error'. Anyone else experienced this?