# Path: stestr/config_file.py
# class TestrConf:
#     def __init__(self, config_file, section='DEFAULT'):
#     def _sanitize_path(self, path):
#     def get_run_command(self, test_ids=None, regexes=None,
#                         test_path=None, top_dir=None, group_regex=None,
#                         repo_type='file', repo_url=None,
#                         serial=False, worker_path=None,
#                         concurrency=0,
#                         exclude_list=None,
#                         include_list=None,
#                         exclude_regex=None,
#                         randomize=False, parallel_class=None):
#             def group_callback(test_id, regex=re.compile(group_regex)):
# 
# Path: stestr/tests/base.py
# class TestCase(testtools.TestCase):
#     def setUp(self):


from unittest import mock
from stestr import config_file
from stestr.tests import base
import ddt
            platform='linux2',
            expected_python='/usr/bin/python')

    def test_get_run_command_emptysysexecutable_noenv(self):
        self._check_get_run_command_exception(
            platform='linux2',
            sys_executable=None)

    def test_get_run_command_emptysysexecutable_win32(self):
        self._check_get_run_command_exception(
            platform='win32', sys_executable=None,
            environment={'PYTHON': 'python3'})

    def test_get_run_command_emptysysexecutable_withenv(self):
        self._check_get_run_command(
            platform='linux2', sys_executable=None,
            expected_python='${PYTHON}',
            environment={'PYTHON': '/usr/bin/python3'})

    def test_get_run_command_win32(self):
        self._check_get_run_command()

    def test_get_run_command_parallel_class(self):
        self._check_get_run_command(parallel_class=True)

    def test_get_run_command_nogroup_regex_noparallel_class(self):
        self._testr_conf.parser.has_option.return_value = False
        self._check_get_run_command(group_regex='',
                                    expected_group_callback=None)


# Path: stestr/config_file.py
# class TestrConf:
#     def __init__(self, config_file, section='DEFAULT'):
#     def _sanitize_path(self, path):
#     def get_run_command(self, test_ids=None, regexes=None,
#                         test_path=None, top_dir=None, group_regex=None,
#                         repo_type='file', repo_url=None,
#                         serial=False, worker_path=None,
#                         concurrency=0,
#                         exclude_list=None,
#                         include_list=None,
#                         exclude_regex=None,
#                         randomize=False, parallel_class=None):
#             def group_callback(test_id, regex=re.compile(group_regex)):
# 
# Path: stestr/tests/base.py
# class TestCase(testtools.TestCase):
#     def setUp(self):


# Path: stestr/tests/test_config_file.py
from unittest import mock
from stestr import config_file
from stestr.tests import base
import ddt

            platform='linux2',
            expected_python='/usr/bin/python')

    def test_get_run_command_emptysysexecutable_noenv(self):
        self._check_get_run_command_exception(
            platform='linux2',
            sys_executable=None)

    def test_get_run_command_emptysysexecutable_win32(self):
        self._check_get_run_command_exception(
            platform='win32', sys_executable=None,
            environment={'PYTHON': 'python3'})

    def test_get_run_command_emptysysexecutable_withenv(self):
        self._check_get_run_command(
            platform='linux2', sys_executable=None,
            expected_python='${PYTHON}',
            environment={'PYTHON': '/usr/bin/python3'})

    def test_get_run_command_win32(self):
        self._check_get_run_command()

    def test_get_run_command_parallel_class(self):
        self._check_get_run_command(parallel_class=True)

    def test_get_run_command_nogroup_regex_noparallel_class(self):
        self._testr_conf.parser.has_option.return_value = False
        self._check_get_run_command(group_regex='',
                                    expected_group_callback=None)


    @ddt.data(('.\\', '.\\\\'),