Ad
  • Custom User Avatar
  • Default User Avatar

    THX!
    That's crazy this copy/paste part has been there for months (I tried it first ages ago). I was suspecting it so I even tried a different browser, but it migrated as well ith my profile lol.
    Sorry I forgot the spoiler tag for the imgur post.

  • Custom User Avatar

    That's because you accidently copy-pasted your code into the sample tests area.

    You can click the reset button to reset it. (Make sure to copy your code first so you don't lose it.)

    But most importantly - Use the spoiler tag when you post your code! Especially for a 2kyu kata... :/

  • Default User Avatar

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

  • Custom User Avatar

    The tests are fine and there is no issue with Python.

    Your solution is timing out probably because it is too slow. As said in the description, the tests will have strings of length 100000.

  • Default User Avatar

    There something odd in this Kata (Python).
    There is a solution sort of given in the test themselves
    The tests fail because of a syntax error in the tests themselves.
    When I test my solution on my machine - It can process a 1600 characters string in a fraction of second, but when I attempt the KAta it times out ????

  • Custom User Avatar

    @marmotteNZ you may find this useful (though it's in JS, not Python)

    EDIT: Additionally, since you mentioned that this Kata was your "first try", you may want to read "Creating your first Kata" carefully in order to better understand what the CW community expects of Kata authors, cheers :-)

  • Custom User Avatar

    Shouldn't 0 be 0in or something?

  • Default User Avatar

    THX sorry for this one - bad copy/paste :/

    I have added more tests - including 0, missing in/fract and carrying

  • Custom User Avatar

    Random tests means tests with inputs randomly generated at runtime, typically 100 tests per run.

    You should definitely check out the existing katas on how random tests are done ;-)

  • Default User Avatar

    THX. Please let me know what you mean with 'random' (sorry for the dumb question - my first try here).
    I woudl not think I need to test for the inputs being something else than positive numbers / integer do I ?

  • Custom User Avatar

    The current sample test is incorrect:

    test.assert_equals(imperial_units(426, 1), "1ft 4 1/2in")
    

    That's about 16.77 inches, so it should be 1ft 5in.

  • Custom User Avatar

    Sample tests is different from actual tests, which is a bad idea.

    The edge cases are also either missing or only exists in sample tests, such as missing ft, in or fractional in, and carrying.

  • Custom User Avatar

    Needs random tests.

  • Custom User Avatar

    this has nothing to do with python 2 or 3 but with the fact that you're returning a numpy array. ;)

  • Loading more items...