<commit_before># -*- coding: utf-8 -*-
'''
    :copyright: Copyright 2017 by the SaltStack Team, see AUTHORS for more details.
    :license: Apache 2.0, see LICENSE for more details.


    tests.support.processes
    ~~~~~~~~~~~~~~~~~~~~~~~

    Process handling utilities
'''

# Import python libs
from __future__ import absolute_import
import logging

# Import pytest-salt libs
from pytestsalt.utils import SaltRunEventListener as PytestSaltRunEventListener
from pytestsalt.utils import collect_child_processes, terminate_process, terminate_process_list  # pylint: disable=unused-import
from pytestsalt.fixtures.daemons import Salt as PytestSalt
from pytestsalt.fixtures.daemons import SaltKey as PytestSaltKey
from pytestsalt.fixtures.daemons import SaltRun as PytestSaltRun
from pytestsalt.fixtures.daemons import SaltCall as PytestSaltCall
from pytestsalt.fixtures.daemons import SaltMaster as PytestSaltMaster
from pytestsalt.fixtures.daemons import SaltMinion as PytestSaltMinion
from pytestsalt.fixtures.daemons import SaltSyndic as PytestSaltSyndic
from pytestsalt.fixtures.daemons import SaltProxy as PytestSaltProxy

# Import tests support libs
from tests.support.paths import ScriptPathMixin

log = logging.getLogger(__name__)


class SaltRunEventListener(ScriptPathMixin, PytestSaltRunEventListener):
    '''
    Override this class's __init__ because there's no request argument since we're still
    not running under pytest
    '''


class GetSaltRunFixtureMixin(ScriptPathMixin):
    '''
    Override this classes `get_salt_run_fixture` because we're still not running under pytest
    '''

    def get_salt_run_fixture(self):
        pass

    def get_salt_run_event_listener(self):
        try:
            return SaltRunEventListener(None,
                                        self.config,
                                        self.event_listener_config_dir or self.config_dir,
                                        self.bin_dir_path,
                                        self.log_prefix,
                                        cli_script_name='run')
        except AttributeError:
            return SaltRunEventListener(None,
                                        self.config,<commit_msg>Log which tags we're looking for<commit_after># -*- coding: utf-8 -*-
'''
    :copyright: Copyright 2017 by the SaltStack Team, see AUTHORS for more details.
    :license: Apache 2.0, see LICENSE for more details.


    tests.support.processes
    ~~~~~~~~~~~~~~~~~~~~~~~

    Process handling utilities
'''

# Import python libs
from __future__ import absolute_import
import logging

# Import pytest-salt libs
import pytestsalt.version
from pytestsalt.utils import SaltRunEventListener as PytestSaltRunEventListener
from pytestsalt.utils import collect_child_processes, terminate_process, terminate_process_list  # pylint: disable=unused-import
from pytestsalt.fixtures.daemons import Salt as PytestSalt
from pytestsalt.fixtures.daemons import SaltKey as PytestSaltKey
from pytestsalt.fixtures.daemons import SaltRun as PytestSaltRun
from pytestsalt.fixtures.daemons import SaltCall as PytestSaltCall
from pytestsalt.fixtures.daemons import SaltMaster as PytestSaltMaster
from pytestsalt.fixtures.daemons import SaltMinion as PytestSaltMinion
from pytestsalt.fixtures.daemons import SaltSyndic as PytestSaltSyndic
from pytestsalt.fixtures.daemons import SaltProxy as PytestSaltProxy

# Import tests support libs
from tests.support.paths import ScriptPathMixin

log = logging.getLogger(__name__)


class SaltRunEventListener(ScriptPathMixin, PytestSaltRunEventListener):
    '''
    Override this class's __init__ because there's no request argument since we're still
    not running under pytest
    '''

    def run(self, tags=(), timeout=10):  # pylint: disable=arguments-differ
        if pytestsalt.version.__version_info__ <= (2018, 9, 28):
            log.info('%s checking for tags: %s', self.__class__.__name__, tags)
        return super(SaltRunEventListener, self).run(tags=tags, timeout=timeout)


class GetSaltRunFixtureMixin(ScriptPathMixin):
    '''
    Override this classes `get_salt_run_fixture` because we're still not running under pytest
    '''

    def get_salt_run_fixture(self):
        pass

    def get_salt_run_event_listener(self):
        try:
            return SaltRunEventListener(None,
                                        self.config,
                                        self.event_listener_config_dir or self.config_dir,
                                        self.bin_dir_path,
                                        self.log_prefix,
                                        cli_script_name='run')
        except AttributeError:
            return SaltRunEventListener(None,
                                        self.config,
{'fraction_non_alphanumeric': 0.06693077564637198, 'fraction_numerical': 0.0047956630525437865, 'mean_word_length': 2.931967213114754, 'pattern_counts': {'":': 0, '<': 4, '<?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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2458374', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1270, 'n_words': 354}