<commit_before>import unittest

from hamcrest import assert_that, equal_to
from mock import MagicMock, call

from mac_os_scripts.disable_handoff_test import _NO_OUTPUT
from mac_os_scripts.map_user_drive import UserDriveMapper
from utils import RunCommandOutput

_PING_PASS = RunCommandOutput(
    stdout="""PING 192.168.0.1 (192.168.0.1): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2

--- 192.168.0.1 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss""",
    stderr='',
    error_level=0,
)

_PING_FAIL = RunCommandOutput(
    stdout="""PING 6.6.6.6 (6.6.6.6): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2

--- 6.6.6.6 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss""",
    stderr='',
    error_level=2,
)<commit_msg>Some thing or other<commit_after>import unittest

from hamcrest import assert_that, equal_to
from mock import MagicMock, call

from mac_os_scripts.disable_handoff_test import _NO_OUTPUT
from mac_os_scripts.map_user_drive import UserDriveMapper
from utils import RunCommandOutput

_PING_PASS = RunCommandOutput(
    stdout="""PING 192.168.0.1 (192.168.0.1): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2

--- 192.168.0.1 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss""",
    stderr='',
    error_level=0,
)

_PING_FAIL = RunCommandOutput(
    stdout="""PING 6.6.6.6 (6.6.6.6): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2clear

--- 6.6.6.6 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss""",
    stderr='',
    error_level=2,
)
{'fraction_non_alphanumeric': 0.09304871373836891, 'fraction_numerical': 0.06568144499178982, 'mean_word_length': 4.345029239766082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 12, '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': '5509875', 'n_tokens_mistral': 685, 'n_tokens_neox': 591, 'n_words': 199}