<commit_before>*** Settings ***
Suite Setup       Check Preconditions
Library           Process.py
Library           OperatingSystem
Resource          resource.txt

*** Test Cases ***
Run process does not change active process
    Some process    active
    ${expected id}=    Get Process Id
    Run Python Process    1+1
    ${id}=    Get Process Id
    Should Be Equal    ${expected id}    ${id}

Killing process
    ${handle}=    Some process
    ${is_alive}=    Process Is Running    ${handle}
    Should Be True    ${is_alive}
    Terminate Process    ${handle}    kill=${True}
    Wait For Process    ${handle}
    Process Should Be Stopped    ${handle}

Terminating process
    ${handle}=    Some process
    Terminate Process    ${handle}
    Wait For Process    ${handle}
    Process Should Be Stopped    ${handle}

Pid
    ${handle}=    Some process
    ${pid}=    Get Process Id    ${handle}
    Should Not Be Equal   ${pid}   ${None}
    Evaluate    if hasattr(os, 'kill') os.kill(int(${pid}),signal.SIGTERM) else os.system('taskkill /pid ${pid}')    os,signal
    Wait For Process    ${handle}
    Process Should Be Stopped    ${handle}

Starting many processes and killing all
    ${handle1}=    Some process
    ${handle2}=    Some process
    ${handle3}=    Some process
    ${handle4}=    Some process
    ${handle5}=    Some process
    Sleep    0.1
    Process Should Be Running    ${handle1}
    Process Should Be Running    ${handle2}
    Process Should Be Running    ${handle3}
    Process Should Be Running    ${handle4}
    Process Should Be Running    ${handle5}<commit_msg>process tests: fix syntax error in test<commit_after>*** Settings ***
Suite Setup       Check Preconditions
Library           Process.py
Library           OperatingSystem
Resource          resource.txt

*** Test Cases ***
Run process does not change active process
    Some process    active
    ${expected id}=    Get Process Id
    Run Python Process    1+1
    ${id}=    Get Process Id
    Should Be Equal    ${expected id}    ${id}

Killing process
    ${handle}=    Some process
    ${is_alive}=    Process Is Running    ${handle}
    Should Be True    ${is_alive}
    Terminate Process    ${handle}    kill=${True}
    Wait For Process    ${handle}
    Process Should Be Stopped    ${handle}

Terminating process
    ${handle}=    Some process
    Terminate Process    ${handle}
    Wait For Process    ${handle}
    Process Should Be Stopped    ${handle}

Pid
    ${handle}=    Some process
    ${pid}=    Get Process Id    ${handle}
    Should Not Be Equal   ${pid}   ${None}
    Evaluate    os.kill(int(${pid}),signal.SIGTERM) if hasattr(os, 'kill') else os.system('taskkill /pid ${pid}')    os,signal
    Wait For Process    ${handle}
    Process Should Be Stopped    ${handle}

Starting many processes and killing all
    ${handle1}=    Some process
    ${handle2}=    Some process
    ${handle3}=    Some process
    ${handle4}=    Some process
    ${handle5}=    Some process
    Sleep    0.1
    Process Should Be Running    ${handle1}
    Process Should Be Running    ${handle2}
    Process Should Be Running    ${handle3}
    Process Should Be Running    ${handle4}
    Process Should Be Running    ${handle5}
{'fraction_non_alphanumeric': 0.09708436724565757, 'fraction_numerical': 0.008684863523573201, 'mean_word_length': 2.4940411700975083, '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': '3521691', 'n_tokens_mistral': 886, 'n_tokens_neox': 874, 'n_words': 343}