<commit_before># -*- coding: utf-8 -*-
'''
unit tests for clustershell roster
'''
# Import Python libs
from __future__ import absolute_import

# Import Salt Testing libraries
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
        NO_MOCK,
        NO_MOCK_REASON,
        MagicMock,
        patch)


@skipIf(NO_MOCK, NO_MOCK_REASON)
class ClusterShellTestCase(TestCase):<commit_msg>Gate clustershell tests: don't run if ClusterShell is missing<commit_after># -*- coding: utf-8 -*-
'''
unit tests for clustershell roster
'''
# Import Python libs
from __future__ import absolute_import

# Import Salt Testing libraries
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
        NO_MOCK,
        NO_MOCK_REASON,
        MagicMock,
        patch)

# Import third-party libs
try:
    from ClusterShell.NodeSet import NodeSet
    HAS_CLUSTERSHELL = True
except (ImportError, OSError) as e:
    HAS_CLUSTERSHELL = False


@skipIf(NO_MOCK, NO_MOCK_REASON)
@skipIf(HAS_CLUSTERSHELL is False, 'Install Python Clustershell bindings before running these tests.')
class ClusterShellTestCase(TestCase):
{'fraction_non_alphanumeric': 0.08079930495221546, 'fraction_numerical': 0.0017376194613379669, 'mean_word_length': 4.097345132743363, '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': '1772867', 'n_tokens_mistral': 366, 'n_tokens_neox': 350, 'n_words': 105}