I love the idea of this kata, but the requirements and tests are whacky. The random tests for Python do not allign with the base tests and I had to hack my class to pass both.
I've spent hours trying to reproduce this error in my IDE, any help appreciated. From the random tests:
> Random tests
> Thing('Eqedspchjyfcwev').is_not_a.owjxbldzcqaq.is_not_a.kvhcljzcvpp.having(4).leqjws.each(lambda th: th.is_the.fsxkqpq_of.vzpvlziyjaim)
> Thing(Eqedspchjyfcwev).is_not_a.owjxbldzcqaq
> Thing(Eqedspchjyfcwev).is_not_a.kvhcljzcvpp
> Thing(Eqedspchjyfcwev).having(4).leqjws
> Thing(leqjws).each(lambda th: th.is_the.fsxkqpq_of.vzpvlziyjaim)
> Testing each - test leqjw 1
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.11/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 105, in _
assert_next(stuff, children_ips)
File "/workspace/default/tests.py", line 608, in check
self.func_arg.apply(stuff,name)
File "/workspace/default/tests.py", line 489, in apply
out = self.get_out(thing)
^^^^^^^^^^^^^^^^^^^
File "/workspace/default/tests.py", line 500, in get_out
out = getattr(out,attr)
^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'vzpvlziyjaim'
I copy-pasted the content of solutions.py into my IDE and added these lines:
t = Thing('Eqedspchjyfcwev')
t.is_not_a.owjxbldzcqaq.is_not_a.kvhcljzcvpp.having(4).leqjws.each(lambda th: th.is_the.fsxkqpq_of.vzpvlziyjaim)
print(t.leqjws[0].fsxkqpq_of) # -> vzpvlziyjaim
I am passing all the Tests, only getting fails on the Attempt.
I'd suggest to add corner cases to the tests as well. I think some solutions would get an indexOutOfBoundsException if the input string would be "the-stealth_warrior-".
The Python tests seem to require the User class to have a method called inc_progress, yet the user's progress is never directly updated. It is updated based on the rank of an activity the user completes. Thus the name inc_progress is very misleading and innapropriate. There should instead be a method called complete_activity that accepts the rank of the activity completed and internally calculates the user's progress. I find this "error" very unprofessional for someone who is at a level where they are writing katas.
C++ translation.
Do we really need a "The code would be called like so" for every single translation?
It'd probably be better to get rid of it to make the description language-agnostic.
I love the idea of this kata, but the requirements and tests are whacky. The random tests for Python do not allign with the base tests and I had to hack my class to pass both.
I've spent hours trying to reproduce this error in my IDE, any help appreciated. From the random tests:
I copy-pasted the content of solutions.py into my IDE and added these lines:
I am passing all the Tests, only getting fails on the Attempt.
okay, so somehow a
Dart
translation happened
No random tests in Java
This comment is hidden because it contains spoiler information about the solution
I'd suggest to add corner cases to the tests as well. I think some solutions would get an indexOutOfBoundsException if the input string would be "the-stealth_warrior-".
BF translation: https://www.codewars.com/kumite/6818f20654568865583ea2b9?sel=6818f20654568865583ea2b9
The Python tests seem to require the User class to have a method called
inc_progress
, yet the user's progress is never directly updated. It is updated based on the rank of an activity the user completes. Thus the nameinc_progress
is very misleading and innapropriate. There should instead be a method calledcomplete_activity
that accepts the rank of the activity completed and internally calculates the user's progress. I find this "error" very unprofessional for someone who is at a level where they are writing katas.Haskell translation
Is every integer included in the test cases unique? If it is, it should probably be put in the description.
JavaScript:
JavaScript:
class
Position
object from the user fileRuby:
Position
from the user moduleLoading more items...