class_docstr: TestRunner to handle running various tests
class_docstr_tok: ["TestRunner","to","handle","running","various","tests"]
code: def __init__(self, options, config):
      self._config = config
      self._options = options
      self._type = options.subcommand
      self._files_filter = options.files
      self._rules = options.rules
      self._rules_dirs = options.rules_dir
      self._rules_engine = self._setup_rules_engine(options.rules_dir)
      self._verbose = options.verbose
      self._quiet = options.quiet
      self._s3_mocker = patch(
          "streamalert.classifier.payload.s3.boto3.resource"
      ).start()
      self._tested_rules = set()
      self._passed = 0
      self._failed = 0
      prefix = self._config["global"]["account"]["prefix"]
      env = {
          "STREAMALERT_PREFIX": prefix,
          "AWS_ACCOUNT_ID": self._config["global"]["account"][
              "aws_account_id"
          ],
          "ALERTS_TABLE": "{}_streamalert_alerts".format(prefix),
      }
  
      if "stats" in options and options.stats:
          env["STREAMALERT_TRACK_RULE_STATS"] = "1"
  
      patch.dict(os.environ, env).start()
  
imports: import argparse
  import os
  import jmespath
  from mock import patch, MagicMock
  from streamalert.alert_processor import main
  from streamalert.alert_processor.helpers import compose_alert
  from streamalert.alert_processor.outputs.output_base import OutputDispatcher
  from streamalert.classifier import classifier
  from streamalert.rules_engine import rules_engine
  from streamalert.shared import rule
  from streamalert.shared.config import ConfigError
  from streamalert.shared.logger import get_logger
  from streamalert.shared.stats import RuleStatisticTracker
  from streamalert_cli.helpers import check_credentials
  from streamalert_cli.test.format import format_green, format_red, format_underline, format_yellow
  from streamalert_cli.test.mocks import LookupTableMocks, ThreatIntelMocks
  from streamalert_cli.test.event_file import TestEventFile
  from streamalert_cli.utils import CLICommand, DirectoryType, generate_subparser, UniqueSortedFileListAction, UniqueSortedListAction
label_desc: Use image node_id 1 to create a new TestRunner object  with example: obj = TestRunner(options, config)