# Path: stestr/results.py
# def wasSuccessful(summary):
#     def __init__(self):
#     def startTestRun(self):
#     def status(self, *args, **kwargs):
#     def get_num_failures(self):
#     def get_time_taken(self):
#     def __init__(self, byte_stream):
#     def status(self, test_id=None, test_status=None, test_tags=None,
#                runnable=True, file_name=None, file_bytes=None, eof=False,
#                mime_type=None, route_code=None, timestamp=None):
#     def __init__(self, get_id, stream, previous_run=None):
#     def _format_error(self, label, test, error_text, test_tags=None):
#     def status(self, **kwargs):
#     def _get_previous_summary(self):
#     def _output_summary(self, run_id):
#     def startTestRun(self):
#     def stopTestRun(self):
#     def get_summary(self):
# class SummarizingResult(testtools.StreamSummary):
# class CatFiles(testtools.StreamResult):
# class CLITestResult(testtools.StreamResult):
# 
# Path: stestr/scheduler.py
# def partition_tests(test_ids, concurrency, repository, group_callback,
#                     randomize=False):
#     def noop(_):
#     def consume_queue(groups):
# def local_concurrency():
# def generate_worker_partitions(ids, worker_path, repository=None,
#                                group_callback=None, randomize=False):
# 
# Path: stestr/selection.py
# def filter_tests(filters, test_ids):
#     def include(test_id):
# def exclusion_reader(exclude_list):
# def _get_regex_from_include_list(file_path):
# def construct_list(test_ids, regexes=None, exclude_list=None,
#                    include_list=None, exclude_regex=None):
# 
# Path: stestr/testlist.py
# def write_list(stream, test_ids):
# def parse_list(list_bytes):
# def parse_enumeration(enumeration_bytes):
# def _v1(list_bytes):
# def _v2(list_bytes):


import io
import os
import re
import signal
import subprocess
import sys
import tempfile
import fixtures
from subunit import v2
from stestr import results
from stestr import scheduler
from stestr import selection
from stestr import testlist
        return subprocess.Popen(cmd, shell=True,
                                stdout=subprocess.PIPE,
                                stdin=subprocess.PIPE,
                                preexec_fn=preexec_fn)

    def list_tests(self):
        """List the tests returned by list_cmd.

        :return: A list of test ids.
        """
        run_proc = self._start_process(self.list_cmd)
        out, err = run_proc.communicate()
        if run_proc.returncode != 0:
            sys.stdout.write("\n=========================\n"
                             "Failures during discovery"
                             "\n=========================\n")
            new_out = io.BytesIO()
            v2.ByteStreamToStreamResult(
                io.BytesIO(out), 'stdout').run(
                    results.CatFiles(new_out))
            out = new_out.getvalue()
            if out:
                sys.stdout.write(out.decode('utf8'))
            if err:
                sys.stderr.write(err.decode('utf8'))
            sys.stdout.write("\n" + "=" * 80 + "\n"
                             "The above traceback was encountered during "
                             "test discovery which imports all the found test"
                             " modules in the specified test_path.\n")
            exit(100)

# Path: stestr/results.py
# def wasSuccessful(summary):
#     def __init__(self):
#     def startTestRun(self):
#     def status(self, *args, **kwargs):
#     def get_num_failures(self):
#     def get_time_taken(self):
#     def __init__(self, byte_stream):
#     def status(self, test_id=None, test_status=None, test_tags=None,
#                runnable=True, file_name=None, file_bytes=None, eof=False,
#                mime_type=None, route_code=None, timestamp=None):
#     def __init__(self, get_id, stream, previous_run=None):
#     def _format_error(self, label, test, error_text, test_tags=None):
#     def status(self, **kwargs):
#     def _get_previous_summary(self):
#     def _output_summary(self, run_id):
#     def startTestRun(self):
#     def stopTestRun(self):
#     def get_summary(self):
# class SummarizingResult(testtools.StreamSummary):
# class CatFiles(testtools.StreamResult):
# class CLITestResult(testtools.StreamResult):
# 
# Path: stestr/scheduler.py
# def partition_tests(test_ids, concurrency, repository, group_callback,
#                     randomize=False):
#     def noop(_):
#     def consume_queue(groups):
# def local_concurrency():
# def generate_worker_partitions(ids, worker_path, repository=None,
#                                group_callback=None, randomize=False):
# 
# Path: stestr/selection.py
# def filter_tests(filters, test_ids):
#     def include(test_id):
# def exclusion_reader(exclude_list):
# def _get_regex_from_include_list(file_path):
# def construct_list(test_ids, regexes=None, exclude_list=None,
#                    include_list=None, exclude_regex=None):
# 
# Path: stestr/testlist.py
# def write_list(stream, test_ids):
# def parse_list(list_bytes):
# def parse_enumeration(enumeration_bytes):
# def _v1(list_bytes):
# def _v2(list_bytes):


# Path: stestr/test_processor.py
import io
import os
import re
import signal
import subprocess
import sys
import tempfile
import fixtures
from subunit import v2
from stestr import results
from stestr import scheduler
from stestr import selection
from stestr import testlist

        return subprocess.Popen(cmd, shell=True,
                                stdout=subprocess.PIPE,
                                stdin=subprocess.PIPE,
                                preexec_fn=preexec_fn)

    def list_tests(self):
        """List the tests returned by list_cmd.

        :return: A list of test ids.
        """
        run_proc = self._start_process(self.list_cmd)
        out, err = run_proc.communicate()
        if run_proc.returncode != 0:
            sys.stdout.write("\n=========================\n"
                             "Failures during discovery"
                             "\n=========================\n")
            new_out = io.BytesIO()
            v2.ByteStreamToStreamResult(
                io.BytesIO(out), 'stdout').run(
                    results.CatFiles(new_out))
            out = new_out.getvalue()
            if out:
                sys.stdout.write(out.decode('utf8'))
            if err:
                sys.stderr.write(err.decode('utf8'))
            sys.stdout.write("\n" + "=" * 80 + "\n"
                             "The above traceback was encountered during "
                             "test discovery which imports all the found test"
                             " modules in the specified test_path.\n")
            exit(100)

        ids = testlist.parse_enumeration(out)