<commit_before>﻿*** Settings ***
Suite Setup     Run Tests  --loglevel TRACE  keywords/trace_log_return_value.txt
Force Tags      regression  pybot  jybot
Resource        atest_resource.txt

*** Test Cases ***

Return from Userkeyword
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'value'  TRACE
    Check Log Message  ${test.kws[0].kws[0].msgs[1]}  Return: u'value'  TRACE

Return from Library Keyword
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'value'  TRACE

Return from Run Keyword
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'value'  TRACE
    Check Log Message  ${test.kws[0].kws[0].msgs[1]}  Return: u'value'  TRACE

Return Non String Object
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[2]}  Return: 1  TRACE

Return None
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: None  TRACE

Return Non Ascii String
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'Hyv\\xe4\\xe4 P\\xe4iv\\xe4\\xe4'  TRACE

Return Object With Unicode Repr
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[2]}  Return: u'Circle is 360\\xb0, Hyv\\xe4\\xe4 \\xfc\\xf6t\\xe4, \\u0989\\u09c4 \\u09f0 \\u09fa \\u099f \\u09eb \\u09ea \\u09b9'  TRACE

Return Object with Invalid Unicode Repr
    [Documentation]  How the return value is logged depends on the interpreter.
    ${test} =    Check Test Case  ${TESTNAME}
    ${path}    ${base} =    Split Path    ${INTERPRETER}
    ${ret} =    Set Variable If    'python' in '${base}'    u'Hyv\\xe4'    Hyvä
    Check Log Message    ${test.kws[0].msgs[1]}    Return: ${ret}    TRACE

Return Object with Non Ascii String from Repr
    [Documentation]  How the return value is logged depends on the interpreter.
    ${test} =    Check Test Case    ${TESTNAME}
    ${path}    ${base} =    Split Path    ${INTERPRETER}
    ${ret} =    Set Variable If    'ipy' in '${base}'    Hyvä    Hyv\\xe4
    Check Log Message    ${test.kws[0].msgs[1]}    Return: ${ret}    TRACE<commit_msg>[python3] atest: keywords/trace_log_return_value: Little workaround.<commit_after>﻿*** Settings ***
Suite Setup     Run Tests  --loglevel TRACE  keywords/trace_log_return_value.txt
Force Tags      regression  pybot  jybot
Resource        atest_resource.txt

*** Test Cases ***

Return from Userkeyword
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'value'  TRACE
    Check Log Message  ${test.kws[0].kws[0].msgs[1]}  Return: u'value'  TRACE

Return from Library Keyword
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'value'  TRACE

Return from Run Keyword
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'value'  TRACE
    Check Log Message  ${test.kws[0].kws[0].msgs[1]}  Return: u'value'  TRACE

Return Non String Object
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[2]}  Return: 1  TRACE

Return None
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: None  TRACE

Return Non Ascii String
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[1]}  Return: u'Hyv\\xe4\\xe4 P\\xe4iv\\xe4\\xe4'  TRACE

Return Object With Unicode Repr
    ${test} =  Check Test Case  ${TESTNAME}
    Check Log Message  ${test.kws[0].msgs[2]}  Return: u'Circle is 360\\xb0, Hyv\\xe4\\xe4 \\xfc\\xf6t\\xe4, \\u0989\\u09c4 \\u09f0 \\u09fa \\u099f \\u09eb \\u09ea \\u09b9'  TRACE

Return Object with Invalid Unicode Repr
    [Documentation]  How the return value is logged depends on the interpreter.
    ${test} =    Check Test Case  ${TESTNAME}
    ${path}    ${base} =    Split Path    ${INTERPRETER}
    ${ret} =    Set Variable If    'python' in '${base}' and not '${PYTHON3}'
    ...    u'Hyv\\xe4'    Hyvä
    Check Log Message    ${test.kws[0].msgs[1]}    Return: ${ret}    TRACE

Return Object with Non Ascii String from Repr
    [Documentation]  How the return value is logged depends on the interpreter.
    ${test} =    Check Test Case    ${TESTNAME}
    ${path}    ${base} =    Split Path    ${INTERPRETER}
    ${ret} =    Set Variable If    'ipy' in '${base}'    Hyvä    Hyv\\xe4
    Check Log Message    ${test.kws[0].msgs[1]}    Return: ${ret}    TRACE
{'fraction_non_alphanumeric': 0.14048140043763677, 'fraction_numerical': 0.027571115973741796, 'mean_word_length': 2.900170648464164, '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': '3862736', 'n_tokens_mistral': 1678, 'n_tokens_neox': 1607, 'n_words': 490}