Ad
  • Custom User Avatar

    Sorry, you're right. The tests could be improved in order not to crash, but the problem is you return a bool when you should return a list. The test crashes because it tries to apply a slice to your answer, which wouldn't happen with a list. It doesn't say tests fails because the test doesn't finish (it crashes).

  • Custom User Avatar

    Thank You for answer, but actually, it's line 18 of << "tests.py", line 18, in doTests >>, not of my code. And that's mean the test doesn't process answer False right. But there 0 tests failed as it's said in the begining of log.

  • Custom User Avatar

    It's hard to help you without knowing your code, but the log is explicit: on line 18 of your code, you try to apply subscript to actual (subscript means you try to access an index slice, here using [:-1 ], [1:]) to a bool object (which means actual is True or False). This is not possible (True[:-1] doesn't make sense), so your code crashes.

    The official documentation can help you: https://docs.codewars.com/training/troubleshooting/

  • Custom User Avatar

    Time: 2790msPassed: 18Failed: 0Exit Code: 1
    Test Results:
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    STDERR
    Traceback (most recent call last):
    File "tests.py", line 26, in
    doTests()
    File "tests.py", line 18, in doTests
    a,b = actual[:-1],actual[1:]
    TypeError: 'bool' object is not subscriptable

    I don't understand what I do wrong.

  • Custom User Avatar

    Hello.

    This is the time my code takes on my PC: 0.006575283594429493 seconds.
    I every time get timeout on Your servers. Sorry, i give up.