Ad
  • Default User Avatar

    Test cases should look like this

    Test.describe('Sample Tests!')
    test.assert_equals(expected, actual)

    And, it should show an error as you are passing 1 as the expected value and 2 as the actual value!! [The test fails and therefore it shows an error]

  • Default User Avatar

    What does the error says?

  • Default User Avatar

    Ohkay! Thanks again! I guess I don't have enough honor now, as I cannot see that option around "Add to Collection". Need to work on increasing my honor! :)

  • Default User Avatar

    As I said, I am able to edit. But while editing the approved python translations, due to a issue in Codewars, The edit is unaccepted.
    Next time, I will just fork the previous version and publish the updates(if any). This situation won't occur the next time. :)

  • Default User Avatar

    My fault, @myjinxin. I would have fixed it when you asked for but was unable due to this bug.

  • Default User Avatar

    Hey, thanks a lot! :)
    Now, isn't the kata edit panel accessable only by the author?
    If not, how to access that?
    @Blind4Basics

  • Default User Avatar

    There is a bit problem. Remember I was talking abour python version python not supported error yesterday. That seems to be an issue with Codewars. Check here https://github.com/Codewars/codewars.com/issues/761 and https://github.com/Codewars/codewars.com/issues/918. Due to this issue the platform is not allowing python translations to be edited again and re-published(without errors). I re-published the kata but due to this issue python version python not supported error kept popping up.
    If you don't get the re-published kata.
    Then just change line 21 in Test Cases with this line
    for i in range(random.choice(range(31, 101, 2))):
    And it will work fine :)

  • Default User Avatar

    I re-published the kata. With the correct format such that it would generate odd strings.

  • Default User Avatar

    My fault, I didn't noticed that the string is supposed to be of odd length.
    I'll publish the updates as soon as possible. :)

  • Default User Avatar

    Ok! I'll make sure that the order is correct in future translations.
    And thanks for pointing it out. :)

  • Default User Avatar

    Okay! I'll fix it soon! As of now, whenever I am trying to run the program in edit mode, its causing an error.
    python version python not supported
    I am not sure why this error shows up. Its the same code as before, haven't made the changes even. I think its an internal error! My other Java translations are running fine in edit mode. And this is my first python translation. Can you suggest something?

  • Default User Avatar

    Yeah! you are right! I'll fix it! But why it is so that the comment says that?

  • Default User Avatar

    These are some of the methods available:

    test.expect(boolean, [optional] message)

    test.assert_equals(actual, expected, [optional] message)

    test.assert_not_equals(actual, expected, [optional] message)

    The available methods in python test env specifies the used arguments as first actual and then expected, unlike java and javascript.

  • Default User Avatar

    O I see! Wish I would have found it on my own! Anyway, Thanks for pointing it out. :)

  • Default User Avatar

    Expected: '['19101', '19102', '19103', '19105', '19106', '19107', '19108', '19109', '19110', '19111', '19112', '19115', '19116', '19117', '19118', '19119', '19120', '19121', '19122', '19123', '19125', '19126', '19127', '19128', '19129', '19130', '19131', '19132', '19133', '19135', '19136', '19137', '19138', '19139', '19150', '19151', '19152', '19153', '19155', '19156', '19157', '19158', '19159', '19160', '19161', '19162', '19163']',

    Expected: '['86001', '86002', '86003', '86005', '86006', '86007', '86008', '86009', '86010', '86011', '86012', '86015', '86016', '86017', '86018', '86019', '86020', '86021', '86022', '86023', '86025', '86026', '86027', '86028', '86029', '86030', '86031', '86032', '86033', '86035', '86036', '86037', '86038', '86039', '86050', '86051', '86052', '86053', '86055', '86056', '86057', '86058', '86059', '86060', '86061', '86062', '86063', '86065', '86066', '86067', '86068', '86069', '86070', '86071', '86072', '86073', '86075', '86076', '86077', '86078', '86079', '86080', '86081', '86082', '86083', '86085', '86086', '86087', '86088', '86089', '86090', '86091', '86092', '86093', '86095', '86096', '86097', '86098', '86099', '86100', '86101', '86102', '86103', '86105', '86106', '86107', '86108', '86109', '86110', '86111', '86112', '86115', '86116', '86117', '86118', '86119', '86120', '86121', '86122', '86123', '86125', '86126', '86127', '86128', '86129', '86150', '86151']'

    These are two Expected Outcomes. The question says not to have '13'. But as seen it retains 13 in the 1st output ['19129', '19130', '19131', '19132', '19133', '19135', '19136', '19137', '19138', '19139', '19150'] but skips the same in the second output ['86129', '86150'].

    I think something is wrong with the test cases. Or am I missing something?

    By the way, Awesome Kata!!! Loved it! :)