class documentation

class TypeCheckSuite(DataSuite): (source)

View In Hierarchy

Undocumented

Method find​_error​_message​_paths Undocumented
Method find​_missing​_cache​_files Undocumented
Method find​_module​_files Undocumented
Method parse​_module Return the module and program names for a test case.
Method run​_case Undocumented
Method run​_case​_once Undocumented
Method verify​_cache Undocumented

Inherited from DataSuite:

Method setup Setup fixtures (ad-hoc)
Class Variable files Undocumented
Class Variable native​_sep Undocumented
Class Variable required​_out​_section Undocumented
Class Variable test​_name​_suffix Undocumented
def find_error_message_paths(self, a): (source)

Undocumented

Parameters
a:List[str]Undocumented
Returns
Set[str]Undocumented
def find_missing_cache_files(self, modules, manager): (source)

Undocumented

Parameters
modules:Dict[str, str]Undocumented
manager:build.BuildManagerUndocumented
Returns
Set[str]Undocumented
def find_module_files(self, manager): (source)

Undocumented

Parameters
manager:build.BuildManagerUndocumented
Returns
Dict[str, str]Undocumented
def parse_module(self, program_text, incremental_step=0): (source)

Return the module and program names for a test case.

Normally, the unit tests will parse the default ('__main__') module and follow all the imports listed there. You can override this behavior and instruct the tests to check multiple modules by using a comment like this in the test case input:

# cmd: mypy -m foo.bar foo.baz

You can also use # cmdN: to have a different cmd for incremental step N (2, 3, ...).

Return a list of tuples (module name, file name, program text).

Parameters
program​_text:strUndocumented
incremental​_step:intUndocumented
Returns
List[Tuple[str, str, str]]Undocumented
def run_case(self, testcase): (source)

Undocumented

Parameters
testcase:DataDrivenTestCaseUndocumented
def run_case_once(self, testcase, operations=[], incremental_step=0): (source)

Undocumented

Parameters
testcase:DataDrivenTestCaseUndocumented
operations:List[FileOperation]Undocumented
incremental​_step:intUndocumented
def verify_cache(self, module_data, a, manager, graph): (source)

Undocumented

Parameters
module​_data:List[Tuple[str, str, str]]Undocumented
a:List[str]Undocumented
manager:build.BuildManagerUndocumented
graph:GraphUndocumented