<commit_before>from wine_env import wine_rc

def test_runrc():

    expected = """WINEPREFIX=$HOME/.local/share/wineprefixes/bottle
export WINEPREFIX
"""
    rc = wine_rc.RunRC('bottle')
    assert expected == rc.get_rc()


def test_runrc_exe():

    expected = """W=/path/to/wine64-1.4

WINESERVER="$W/bin/wineserver"
export WINESERVER
LD_LIBRARY_PATH="$W/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
WINELOADER="$W/bin/wine"
export WINELOADER
WINESERVERPATH="$W"
export WINESERVERPATH
WINEDLLPATH="$W/lib/wine/fakedlls"
export WINEDLLPATH
PATH="$W/bin:$PATH"
export PATH
WINEPREFIX="$HOME/.local/share/wineprefixes/bottle"
export WINEPREFIX
"""
    rc = wine_rc.RunRC('bottle', '/path/to/wine64-1.4/bin/wine')
    assert expected == rc.get_rc()
<commit_msg>Full unit tests added<commit_after>from wine_env import wine_rc
import os


def get_path(filename):
    directory = os.path.dirname(__file__)
    return os.path.join(directory, 'test_data', filename)


def test_runrc():
    rc = wine_rc.RunRC('bottle')
    with open(get_path('runrc.sh')) as f:
        expected = f.read()
    assert expected == rc.get_rc()


def test_runrc_exe():
    rc = wine_rc.RunRC('bottle', '/path/to/wine64-1.4/bin/wine')
    with open(get_path('runrc_exe.sh')) as f:
        expected = f.read()
    assert expected == rc.get_rc()


def test_uncorkc():
    rc = wine_rc.UncorkRC('bottle')
    with open(get_path('uncorkrc.sh')) as f:
        expected = f.read()
    assert expected == rc.get_rc()


def test_uncorkc_exe():
    rc = wine_rc.UncorkRC('bottle', '/path/to/wine-1.7.3/bin/wine')
    with open(get_path('uncorkrc_exe.sh')) as f:
        expected = f.read()
    assert expected == rc.get_rc()


def test_corkrc():
    rc = wine_rc.CorkRC('bottle')
    with open(get_path('corkrc.sh')) as f:
        expected = f.read()
    assert expected == rc.get_rc()


def test_corkrc_exe():

    rc = wine_rc.CorkRC('bottle', '/path/to/wine-1.7.3/bin/wine')
    with open(get_path('corkrc_exe.sh')) as f:
        expected = f.read()
    assert expected == rc.get_rc()
{'fraction_non_alphanumeric': 0.15666178623718888, 'fraction_numerical': 0.008784773060029283, 'mean_word_length': 3.7674418604651163, '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': '3048165', 'n_tokens_mistral': 827, 'n_tokens_neox': 785, 'n_words': 144}