<commit_before>*** Settings ***
Suite Setup      Run Tests And Remove Keywords
Default Tags    regression  pybot  jybot
Resource        atest_resource.txt

*** Variables ***
${PASS MESSAGE}    -PASSED -ALL
${FAIL MESSAGE}    -ALL +PASSED
${FOR MESSAGE}     -FOR -ALL
${REMOVED WUKS MESSAGE}    -WUKS -ALL
${KEPT WUKS MESSAGE}       +WUKS -ALL

*** Test Cases ***

PASSED option when test passes
    Log should not contain    ${PASS MESSAGE}
    Output should contain pass message

PASSED option when test fails
    Log should contain    ${FAIL MESSAGE}
    Output should contain fail message

FOR option
    Log should not contain    ${FOR MESSAGE}
    Output should contain for messages

WUKS option
    Log should not contain    ${REMOVED WUKS MESSAGE}
    Log should contain    ${KEPT WUKS MESSAGE}
    Output should contain WUKS messages


*** Keywords ***

Run tests and remove keywords
    ${opts} =    Catenate
    ...    --removekeywords passed
    ...    --RemoveKeywords FoR
    ...    --removek WUKS
    ...    --log log.html
    Run tests    ${opts}    cli/remove_keywords/all_combinations.txt
    ${LOG} =    Get file    ${OUTDIR}/log.html
    Set suite variable    $LOG

Log should not contain
    [Arguments]    ${msg}
    Should not contain    ${LOG}    ${msg}

Log should contain
    [Arguments]    ${msg}
    Should contain    ${LOG}    ${msg}

Output should contain pass message
    ${tc} =   Check test case    Passing
    Check Log Message    ${tc.kws[0].msgs[0]}    ${PASS MESSAGE}

Output should contain fail message
    ${tc} =   Check test case    Failing
    Check Log Message    ${tc.kws[0].msgs[0]}    ${FAIL MESSAGE}

Output should contain for messages
    Test should contain for messages    For when test passes
    Test should contain for messages    For when test fails

Test should contain for messages
    [Arguments]    ${name}
    ${tc} =    Check test case    ${name}
    Check log message    ${tc.kws[0].kws[0].kws[0].msgs[0]}    ${FOR MESSAGE} one
    Check log message    ${tc.kws[0].kws[1].kws[0].msgs[0]}    ${FOR MESSAGE} two
    Check log message    ${tc.kws[0].kws[2].kws[0].msgs[0]}    ${FOR MESSAGE} three

Output should contain WUKS messages
    Test should contain WUKS messages    WUKS when test passes
    Test should contain WUKS messages    WUKS when test fails

Test should contain WUKS messages
    [Arguments]    ${name}
    ${tc} =    Check test case    ${name}
    Check log message    ${tc.kws[0].kws[0].kws[1].kws[0].msgs[0]}   ${REMOVED WUKS MESSAGE}    FAIL
    Check log message    ${tc.kws[0].kws[8].kws[1].kws[0].msgs[0]}   ${REMOVED WUKS MESSAGE}    FAIL
    Check log message    ${tc.kws[0].kws[9].kws[2].kws[0].msgs[0]}   ${KEPT WUKS MESSAGE}    FAIL<commit_msg>still failed to make all remove keyword tests pass after changing how for loops are handled.....<commit_after>*** Settings ***
Suite Setup      Run Tests And Remove Keywords
Default Tags    regression  pybot  jybot
Resource        atest_resource.txt

*** Variables ***
${PASS MESSAGE}    -PASSED -ALL
${FAIL MESSAGE}    -ALL +PASSED
${REMOVED FOR MESSAGE}     -FOR -ALL
${KEPT FOR MESSAGE}        +FOR -ALL
${REMOVED WUKS MESSAGE}    -WUKS -ALL
${KEPT WUKS MESSAGE}       +WUKS -ALL

*** Test Cases ***

PASSED option when test passes
    Log should not contain    ${PASS MESSAGE}
    Output should contain pass message

PASSED option when test fails
    Log should contain    ${FAIL MESSAGE}
    Output should contain fail message

FOR option
    Log should not contain    ${REMOVED FOR MESSAGE}
    Log should contain    ${KEPT FOR MESSAGE}
    Output should contain for messages

WUKS option
    Log should not contain    ${REMOVED WUKS MESSAGE}
    Log should contain    ${KEPT WUKS MESSAGE}
    Output should contain WUKS messages


*** Keywords ***

Run tests and remove keywords
    ${opts} =    Catenate
    ...    --removekeywords passed
    ...    --RemoveKeywords FoR
    ...    --removek WUKS
    ...    --log log.html
    Run tests    ${opts}    cli/remove_keywords/all_combinations.txt
    ${LOG} =    Get file    ${OUTDIR}/log.html
    Set suite variable    $LOG

Log should not contain
    [Arguments]    ${msg}
    Should not contain    ${LOG}    ${msg}

Log should contain
    [Arguments]    ${msg}
    Should contain    ${LOG}    ${msg}

Output should contain pass message
    ${tc} =   Check test case    Passing
    Check Log Message    ${tc.kws[0].msgs[0]}    ${PASS MESSAGE}

Output should contain fail message
    ${tc} =   Check test case    Failing
    Check Log Message    ${tc.kws[0].msgs[0]}    ${FAIL MESSAGE}

Output should contain for messages
    Test should contain for messages    For when test passes
    Test should contain for messages    For when test fails

Test should contain for messages
    [Arguments]    ${name}
    ${tc} =    Check test case    ${name}
    ${for} =    Set Variable    ${tc.kws[0].kws[0]}
    Check log message    ${for.kws[0].kws[0].kws[0].msgs[0]}    ${REMOVED FOR MESSAGE} one
    Check log message    ${for.kws[1].kws[0].kws[0].msgs[0]}    ${REMOVED FOR MESSAGE} two
    Check log message    ${for.kws[2].kws[0].kws[0].msgs[0]}    ${REMOVED FOR MESSAGE} three
    Check log message    ${for.kws[3].kws[0].kws[0].msgs[0]}    ${KEPT FOR MESSAGE} LAST

Output should contain WUKS messages
    Test should contain WUKS messages    WUKS when test passes
    Test should contain WUKS messages    WUKS when test fails

Test should contain WUKS messages
    [Arguments]    ${name}
    ${tc} =    Check test case    ${name}
    Check log message    ${tc.kws[0].kws[0].kws[1].kws[0].msgs[0]}   ${REMOVED WUKS MESSAGE}    FAIL
    Check log message    ${tc.kws[0].kws[8].kws[1].kws[0].msgs[0]}   ${REMOVED WUKS MESSAGE}    FAIL
    Check log message    ${tc.kws[0].kws[9].kws[2].kws[0].msgs[0]}   ${KEPT WUKS MESSAGE}    FAIL
{'fraction_non_alphanumeric': 0.11218169304886441, 'fraction_numerical': 0.01169993117687543, 'mean_word_length': 2.6628859483301826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3942361', 'n_tokens_mistral': 1949, 'n_tokens_neox': 1918, 'n_words': 642}