Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Approved

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Default User Avatar

    that's what I was aiming for, couldnt get it in a one single line...

  • Custom User Avatar
  • Default User Avatar

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

  • Default User Avatar

    there's no need to think thatt much, but its good to know other solutions too ;-)

  • Default User Avatar

    If you have failed tests starting from the 6th test, and you dont have any idea what's wrong, you should know that:

    1. The main function requies some input args.
    2. Initial 'limit' value could be non-integer (float).

    Note to kata creator: Kata instruction is not full, there is nothing about that conditions (please complement).

  • Default User Avatar

    One test in "handle inheritance correctly" says that Test Passed when nothing is returned and the exception is not raised while the res of function is "string is one", type of res is "<class 'str'>" and expected type is "<class 'collections.abc.Iterable'>". I think in such a case it should raise UnexpectedTypeException 'cause str is not collections.abc.Iterable', but then it says that the test is not passed.

    P.S. Sorry for my clumsy English

  • Custom User Avatar

    Wow! This solution is amazing :)

  • Default User Avatar
    Traceback (most recent call last):
      File "tests.py", line 18, in <module>
        return_something(None)
      File "/workspace/default/solution.py", line 5, in inner2
        raise UnexpectedTypeException
    NameError: name 'UnexpectedTypeException' is not defined
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "tests.py", line 20, in <module>
        except UnexpectedTypeException:
    NameError: name 'UnexpectedTypeException' is not defined
    

    I think Python test is broken. (I'm tried to raise UnexpectedTypeException and another errors but nothing really worked)

  • Custom User Avatar

    Description should be language-agnostic (remove function block)

  • Custom User Avatar

    Yes,the kata seems to be expecting the 2 types to be the same and no exception should be raised which I found a bit odd.

  • Custom User Avatar

    I didn't solve this kata, but:

    >>>from collections import Counter
    >>>type(Counter([]))
    <class 'collections.Counter'>
    

    In my understanding of the kata, it is not the same type (though it can be subclass).

    Unless I misunderstood your post: do you mean the kata expects no exception in such cases? If so, I agreee the description is lacking some specifications.

  • Custom User Avatar

    I believe there are some tests that are wrong: a dict type is not supposed to rais an exception on collections.counter for instance. Any suggestion/clue of why that is?

  • Loading more items...