You need to sign in or sign up before continuing.×
Ad
  • Custom User Avatar

    thanks, that makes sense

  • Custom User Avatar

    In many random tests, all my test rows match except for a few, e.g.

    correct answer:
    "'D...'" 9!  Xy14lmTDftz-
    YtlLqmJ3Q!  "Gli9..."
    
    my answer:
    "'D...'" 9!  Xy14lmTDft-
    zYtlLqmJ3Q!  "Gli9..."
    

    In this example, the last letter of line (n) is shifted to the beginning of line (n+1) compared to the reference solution.

    Can I assume that if "123\n4567" is a correct solution, then "1234\n567" is also a correct? Is there a rule to make the solution unique?

  • Custom User Avatar

    It would be great if the random tests could be given an individual heading, or even consecutive numbering. Now every random test has the same name: Input text, Correct answer, and Answer returned.

  • Custom User Avatar

    They both serve a purpose. The text is better for direct eyeballing while the string literals are better for copying for further testing/debugging. If one of them was to be removed it's 1, because it is less exact. But there's no need for that, is there. It's not like it's in the way. What can be done though is to combine them by line breaking string literals in some way such that it can still be copied and evaluated, for example:

    ''.join(
     [ 'Hi, I am some \n'
     , 'text and I need \n'
     , 'to be arranged.'
     ]
    )
    

    .. the real problem here in my opinion is that the input text isn't a string literal

  • Custom User Avatar

    (python)
    If a test is not passed, result is displayed twice:

    1. nicely formatted: Expect/Actual
    2. unformatted: Actual/Expected
    Input text: 
    
    Hi, I am some text and I need to be arranged.
    
    Line length: 15
    
    * Correct answer: 
    
    Hi, I am some
    text and I need
    to be arranged.
    
    * Answer returned: 
    
    Hi, I am some 
    text and I need 
    to be arranged.
    : 'Hi, I am some \ntext and I need \nto be arranged.' should equal 'Hi, I am some\ntext and I need\nto be arranged.'
    

    Is it possible to display only 1)?

  • Custom User Avatar

    I want to see the EN DASH character in the text. To do this, I copy the dash character from the sample tests window and execute the following code in python:

    import unicodedata
    c = "—" # char copied from the sample tests window in browser
    print(f"Unicode-Name: {unicodedata.name(c)}")
    

    the python output is "Unicode-Name: EM DASH".
    As I understand the description, an EN DASH was used in the text. Can someone please explain what I am misunderstanding?

  • Custom User Avatar

    Below you can see an excerpt from the description/sample tests in python, I replaced space characters by dots to make it easier to compare. The expected line length is 30 characters.

    (1)"nunc,..at..aliquet.orci..Fusce"
    (2)"at...dolor...sit...amet..felis"
    

    The sequence of spaces in line (1) is: 2, 2, 2.
    The word "at" at the beginning of line (2) could be appended at the end of line (1) if each sequence of 2 spaces would be replace by 1 space, couldn't it?

  • Custom User Avatar

    SMH calculating max() three times for the same values is not according to the DRY programming principle

  • Custom User Avatar

    the JavaScript test suite uses the deprecated Test framework

  • Custom User Avatar

    The target_case listed by the tests is currently inaccurate for python. In your example, the test says it's testing for a target_case of camel, but the listed expected value of jklmn_j_l_m_j_k_lijklm suggests that it's actually testing for a target_case of snake. This probably sent you looking in the wrong place for a bug in your code. I would suggest printing the inputs for now so you can correctly debug your solution and hopefully someone will fix the tests soon.

    As for the actual problem in your code, your code is failing tests where the input is camelCase and the target_case is snake.

  • Custom User Avatar

    Tests in python report that they are testing for a certain target_case, but are often actually testing for a completely different target_case. (The actual target_case passed to the user's function is different than the target_case reported in the it block message).

    Tests in python also run the user solution 3 times, followed by 3 tests, making logs look more confusing than they need to be if the user tries to log anything in their solution.

    running print(identifier, target_case) produces the following output (The lines under "Log" are what my code printed, the other lines are the it block messages:

    Log
    defghKLMNODEFGcdefg kebab
    bcdefghijklmn-ghijklm-efghijkl-hijkl camel
    fghijkl_fghijklmn_fghijklm_ghijklm camel
    
    
    identifier = 'defghKLMNODEFGcdefg'
    target_case = 'camel'
    
    
    identifier = 'bcdefghijklmn-ghijklm-efghijkl-hijkl'
    target_case = 'kebab'
    
    
    identifier = 'fghijkl_fghijklmn_fghijklm_ghijklm'
    target_case = 'snake'
    
  • Custom User Avatar

    I think I'm making a mistake with the random tests, because 550 warriors were able to solve the task in Python:

    This is the error message:

    identifier = 'jklmnJKLMJKLijklm'
    target_case = 'camel'
    Expected: jklmn_j_k_l_m_j_k_lijklm Instead got: jklmn_jKLMJKLijklm: 'jklmn_jKLMJKLijklm' should equal 'jklmn_j_l_m_j_k_lijklm'
    
    The expected result looks like snake case although it should be camel case. My result is neither ‘jklmn_j_k_l_m_j_k_lijklm’ nor ‘jklmn_j_k_l_m_j_k_lijklm’ but ‘jklmnJKLMJKLijklm’.
    
    

    Can someone please help me?