<commit_before>*** Settings ***
Documentation   How variables from CLI override other variables is tested in variable_priorities.html
Suite Setup     Run Test Data
Force Tags      pybot  jybot  regression
Resource        atest_resource.txt

*** Variables ***
${VARFILEDIR}  ${CURDIR}/../../testdata/variables/resvarfiles

*** Test Cases ***
Variables From Variable File
    Check Test Case  Variables From Variable File

Arguments To Variable Files
    Check Test Case  Arguments To Variable Files

Non-Existing Variable File
    Check Stderr Contains  [ ERROR ]  Importing variable file 'non_existing.py' failed: File or directory does not exist.

Too Few Arguments To Variable File
    Check Stderr Contains  [ ERROR ]  Processing variable file '${VARFILE2}' failed:  TypeError: get_variables()

Too Many Arguments To Variable File
    Check Stderr Contains  [ ERROR ]  Processing variable file '${VARFILE2}' with arguments [ too | many | args ] failed:  TypeError: get_variables()

Invalid Variable File
    Check Stderr Contains  [ ERROR ]  Processing variable file '${VARFILE2}' with arguments [ FAIL ] failed:  ZeroDivisionError:

*** Keywords ***
Run Test Data
    ${varfile} =  Normalize Path  ${VARFILEDIR}/cli_vars.py
    ${varfile2} =  Normalize Path  ${VARFILEDIR}/cli_vars_2.py
    ${varfile3} =  Normalize Path  ${VARFILEDIR}/cli_vars_invalid.py
    Run Tests  --variablefile ${varfile} -V ${varfile2}:arg -V ${varfile2}:arg2:given --variablefile non_existing.py --variablefile ${varfile2} -V ${varfile2}:too:many:args -V ${varfile2}:FAIL  variables/commandline_variable_files.txt
    Set Suite Variable  $VARFILE2
<commit_msg>test cleanup<commit_after>*** Settings ***
Documentation   How variables from CLI override other variables is tested in variable_priorities.html
Suite Setup     Run Test Data
Force Tags      pybot  jybot  regression
Resource        atest_resource.txt

*** Variables ***
${VARFILEDIR}  ${CURDIR}/../../testdata/variables/resvarfiles

*** Test Cases ***
Variables From Variable File
    Check Test Case  Variables From Variable File

Arguments To Variable Files
    Check Test Case  Arguments To Variable Files

Non-Existing Variable File
    Check Stderr Contains  [ ERROR ] Importing variable file '${VF3}' failed: File or directory does not exist.
    Check Stderr Contains  [ ERROR ] Importing variable file '${VF4}' failed: File or directory does not exist.

Too Few Arguments To Variable File
    Check Stderr Contains  [ ERROR ] Processing variable file '${VF2}' failed: TypeError: get_variables()

Too Many Arguments To Variable File
    Check Stderr Contains  [ ERROR ] Processing variable file '${VF2}' with arguments [ too | many | args ] failed: TypeError: get_variables()

Invalid Variable File
    Check Stderr Contains  [ ERROR ] Processing variable file '${VF2}' with arguments [ FAIL ] failed: ZeroDivisionError:

*** Keywords ***
Run Test Data
    ${vf1} =  Normalize Path  ${VARFILEDIR}/cli_vars.py
    ${vf2} =  Normalize Path  ${VARFILEDIR}/cli_vars_2.py
    ${vf3} =  Normalize Path  ${VARFILEDIR}/non_existing.py
    ${vf4} =  Set Variable  non_absolute_non_existing.py
    ${varfiles} =  Catenate
    ...  --variablefile ${vf1}
    ...  -V ${vf2}:arg
    ...  -V ${vf2}:arg2:given
    ...  --variablefile ${vf2}
    ...  -V ${vf2}:FAIL
    ...  -V ${vf2}:too:many:args
    ...  --variablefile ${vf3}
    ...  --variablefile ${vf4}
    Run Tests  ${varfiles}  variables/commandline_variable_files.txt
    Set Suite Variable  $VF2
    Set Suite Variable  $VF3
    Set Suite Variable  $VF4
{'fraction_non_alphanumeric': 0.10312764158918004, 'fraction_numerical': 0.009861932938856016, 'mean_word_length': 3.6710526315789473, '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': '4621857', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1030, 'n_words': 359}