Ad
  • Custom User Avatar

    Ah, I see. Thank you!

  • Custom User Avatar

    Because in the tests your function is called once and twice: rot13(rot13("some_string")), and your function isn't returning, so the default returned value is None, the result of calling your function once, and that's the input of the tests where it's called twice. Not a kata issue.

    rot13 on predefined strings
    Log
    test <- input of the test, a string
    None should equal 'grfg'
    ^
    Your function returned None
    Log
    test <- input of the test
    None <- your function returned None
    None should equal 'test'
    ^
    Your function should have returned the original string when encoded twice
    
  • Custom User Avatar

    I wanted to iterate over the string in message, but was returning an error saying I couldn't iterate over Nonetype - which was weird, as I assumed the input was a string
    So I ran one line with print(message) and it returned this:

    rot13 on predefined strings
    Log
    test
    None should equal 'grfg'
    Log
    test
    None
    None should equal 'test'
    

    Why is it doing this?

  • Custom User Avatar

    debug using print thru each stage from input to output

  • Custom User Avatar

    Function def is included in char count