# Path: sampletester/parser.py
# SCHEMA_TYPE_KEY = 'type'
# SCHEMA_TYPE_ABSENT = '(no type)' # for indexing docs with no SCHEMA_TYPE_KEY
# SCHEMA_TYPE_SEPARATOR = '/'
# SCHEMA_VERSION_KEY = 'schema_version'
# class SchemaDescriptor:
# class IndexedDocs(object):
# class YamlDocSyntaxError(Exception):
#   def __post_init__(self) -> str:
#   def has_version(self) -> bool:
#   def __init__(self,
#                strict: bool = False,
#                resolver: Callable[[Document], str] = None):
#   def contains(self, *type_names: str) -> bool:
#   def from_files(self, *paths: str):
#   def from_strings(self, *sources: Tuple[str, str]):
#   def add(self, content:str, file_name: str):
#   def add_documents(self, *documents: Document):
#   def of_type(self, type_name: str) -> List[Document]:
#   def resolve_uncategorized(self):
# def only_files_in(paths: Iterable[str]) -> Set[str]:


import copy
import logging
import re
import yaml
from typing import List
from sampletester import parser
    return visitor.end_visit()


SCHEMA = parser.SchemaDescriptor('test','samples', 1)

def suite_configs_from(test_docs: List[parser.Document]) -> List[object]:
  """Returns the suite configs (key/value pairs) from all the `test_docs`.

  Helper function for suites_from(), which is what most clients will want to call.
  """
  all_suites = []
  for doc in test_docs:
      if (doc.obj.get(SCHEMA.type_key) != SCHEMA.full_type or
          doc.obj.get(SCHEMA.version_key) != SCHEMA.version):
        continue
      tests = doc.obj.get("test",{})
      these_suites = tests.get("suites", [])
      for suite in these_suites:
        suite[SUITE_SOURCE] = doc.path
      all_suites.extend(these_suites)
  if not all_suites:
    logging.warning('no test suites specified')
  return all_suites

def suites_from_doc_list(test_docs: List[parser.Document],
                         suite_filter: str = None,
                         case_filter: str = None) -> List[Suite]:
  """Creates Suite objects from the given YAML test_docs"""
  return [Suite(spec, suite_filter, case_filter) for spec in suite_configs_from(test_docs)]


# Path: sampletester/parser.py
# SCHEMA_TYPE_KEY = 'type'
# SCHEMA_TYPE_ABSENT = '(no type)' # for indexing docs with no SCHEMA_TYPE_KEY
# SCHEMA_TYPE_SEPARATOR = '/'
# SCHEMA_VERSION_KEY = 'schema_version'
# class SchemaDescriptor:
# class IndexedDocs(object):
# class YamlDocSyntaxError(Exception):
#   def __post_init__(self) -> str:
#   def has_version(self) -> bool:
#   def __init__(self,
#                strict: bool = False,
#                resolver: Callable[[Document], str] = None):
#   def contains(self, *type_names: str) -> bool:
#   def from_files(self, *paths: str):
#   def from_strings(self, *sources: Tuple[str, str]):
#   def add(self, content:str, file_name: str):
#   def add_documents(self, *documents: Document):
#   def of_type(self, type_name: str) -> List[Document]:
#   def resolve_uncategorized(self):
# def only_files_in(paths: Iterable[str]) -> Set[str]:


# Path: sampletester/testplan.py
import copy
import logging
import re
import yaml
from typing import List
from sampletester import parser

    return visitor.end_visit()


SCHEMA = parser.SchemaDescriptor('test','samples', 1)

def suite_configs_from(test_docs: List[parser.Document]) -> List[object]:
  """Returns the suite configs (key/value pairs) from all the `test_docs`.

  Helper function for suites_from(), which is what most clients will want to call.
  """
  all_suites = []
  for doc in test_docs:
      if (doc.obj.get(SCHEMA.type_key) != SCHEMA.full_type or
          doc.obj.get(SCHEMA.version_key) != SCHEMA.version):
        continue
      tests = doc.obj.get("test",{})
      these_suites = tests.get("suites", [])
      for suite in these_suites:
        suite[SUITE_SOURCE] = doc.path
      all_suites.extend(these_suites)
  if not all_suites:
    logging.warning('no test suites specified')
  return all_suites

def suites_from_doc_list(test_docs: List[parser.Document],
                         suite_filter: str = None,
                         case_filter: str = None) -> List[Suite]:
  """Creates Suite objects from the given YAML test_docs"""
  return [Suite(spec, suite_filter, case_filter) for spec in suite_configs_from(test_docs)]


def suites_from(indexed_docs: parser.IndexedDocs,