Ad
  • Custom User Avatar

    You are right that tests are a mess, but it's not specific for this particular kata. It's very common for kata authors to organize tests in a way that test cases are not easy to distinguish one from another, inputs and other information is not shown explicitly, assertion messages are consufing or not informative. For some reason this way of (non-)organization of tests became a standard in CW kata and many users (including authors) do not see a problem with this, while others (like, for example, me) are extremelly annoyed by this, but have no time nor resources to fix all this many of existing kata.

    You are wrong though that display of logs and tests results is inconsistent. Logs from a test case always appear above the assertion message (i.e. the green or red line). Your solution is run first, it prints whatever you log, and then assertion is performed displaying a green/red line. Test cases do not display logs below the result message. It's always above.

  • Custom User Avatar

    Fix your code. Hmm, I guess ~9000 people solved it in python by mistake.

    Your screenshot shows you returning True, when it should be False (and quite obvious why, since 'x' is only in one of the strings)

  • Custom User Avatar

    It can help to print the return value to console too, so that you can be sure which results match up with which inputs.

  • Custom User Avatar

    The kata is fine:

    Python Completions 8996

    The log appears above the test result, so that's the input of the next test. Fix your code.