# Path: sampletester/inputs.py
# def untyped_yaml_resolver(unknown_doc: parser.Document) -> str :
# def index_docs(*file_patterns: str) -> parser.IndexedDocs:
#   def log_files(indexed_files):
# def create_indexed_docs(*all_paths: Set[str]) -> parser.IndexedDocs:
# def get_globbed(*file_patterns: str) -> Set[str]:
# 
# 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 os
import unittest
from contextlib import contextmanager
from sampletester import inputs
from sampletester import parser
                          'alternate-configs/woodchuck_t.yaml',
                          'alternate-configs/vicuna_t.yaml',
                          'alternate-configs/some.yaml',
                          'multidocs/bee.yaml',
                          'multidocs/mosquito.yaml',
                          'multidocs/ant.yaml'}},
                        {doc.path
                         for doc in indexed.of_type(inputs.TESTPLAN_SCHEMA.primary_type)})
      self.assertEquals(set(),
                        {doc.path
                         for doc in indexed.of_type(parser.SCHEMA_TYPE_ABSENT)})

      # Explicitly specify a testplan file (only 1):
      #  only manifests are implicit (get multiple)
      indexed = inputs.index_docs('configs/woodchuck*')
      self.assertEquals({os.path.abspath(fname) for fname in
                         {'configs/zebra_m.yaml',
                          'configs/yak_m.yaml',
                          'alternate-configs/zebra_m.yaml',
                          'alternate-configs/yak_m.yaml',
                          'multidocs/bee.yaml',
                          'multidocs/mosquito.yaml',
                          'multidocs/ant.manifest.yaml'}},
                        {doc.path
                         for doc in indexed.of_type(inputs.MANIFEST_SCHEMA.primary_type)})
      self.assertEquals({os.path.abspath(fname) for fname in  {'configs/woodchuck_t.yaml'}},
                        {doc.path
                         for doc in indexed.of_type(inputs.TESTPLAN_SCHEMA.primary_type)})
      self.assertEquals(set(),
                        {doc.path

# Path: sampletester/inputs.py
# def untyped_yaml_resolver(unknown_doc: parser.Document) -> str :
# def index_docs(*file_patterns: str) -> parser.IndexedDocs:
#   def log_files(indexed_files):
# def create_indexed_docs(*all_paths: Set[str]) -> parser.IndexedDocs:
# def get_globbed(*file_patterns: str) -> Set[str]:
# 
# 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: tests/inputs_test.py
import os
import unittest
from contextlib import contextmanager
from sampletester import inputs
from sampletester import parser

                          'alternate-configs/woodchuck_t.yaml',
                          'alternate-configs/vicuna_t.yaml',
                          'alternate-configs/some.yaml',
                          'multidocs/bee.yaml',
                          'multidocs/mosquito.yaml',
                          'multidocs/ant.yaml'}},
                        {doc.path
                         for doc in indexed.of_type(inputs.TESTPLAN_SCHEMA.primary_type)})
      self.assertEquals(set(),
                        {doc.path
                         for doc in indexed.of_type(parser.SCHEMA_TYPE_ABSENT)})

      # Explicitly specify a testplan file (only 1):
      #  only manifests are implicit (get multiple)
      indexed = inputs.index_docs('configs/woodchuck*')
      self.assertEquals({os.path.abspath(fname) for fname in
                         {'configs/zebra_m.yaml',
                          'configs/yak_m.yaml',
                          'alternate-configs/zebra_m.yaml',
                          'alternate-configs/yak_m.yaml',
                          'multidocs/bee.yaml',
                          'multidocs/mosquito.yaml',
                          'multidocs/ant.manifest.yaml'}},
                        {doc.path
                         for doc in indexed.of_type(inputs.MANIFEST_SCHEMA.primary_type)})
      self.assertEquals({os.path.abspath(fname) for fname in  {'configs/woodchuck_t.yaml'}},
                        {doc.path
                         for doc in indexed.of_type(inputs.TESTPLAN_SCHEMA.primary_type)})
      self.assertEquals(set(),
                        {doc.path

                         for doc in indexed.of_type(parser.SCHEMA_TYPE_ABSENT)})