class documentation

class FineGrainedSuite(DataSuite): (source)

Known subclasses: mypy.test.testfinegrainedcache.FineGrainedCacheSuite

View In Hierarchy

Undocumented

Method build Undocumented
Method format​_triggered Undocumented
Method get​_build​_steps Get the number of regular incremental steps to run, from the test source
Method get​_options Undocumented
Method get​_suggest Undocumented
Method maybe​_suggest Undocumented
Method parse​_sources Return target BuildSources for a test case.
Method perform​_step Perform one fine-grained incremental build step (after some file updates/deletions).
Method run​_case Undocumented
Method run​_check Undocumented
Method should​_skip Undocumented
Class Variable files Undocumented
Class Variable use​_cache Undocumented

Inherited from DataSuite:

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

Undocumented

Parameters
options:OptionsUndocumented
sources:List[BuildSource]Undocumented
Returns
List[str]Undocumented
def format_triggered(self, triggered): (source)

Undocumented

Parameters
triggered:List[List[str]]Undocumented
Returns
List[str]Undocumented
def get_build_steps(self, program_text): (source)
Get the number of regular incremental steps to run, from the test source
Parameters
program​_text:strUndocumented
Returns
intUndocumented
def get_options(self, source, testcase, build_cache): (source)

Undocumented

Parameters
source:strUndocumented
testcase:DataDrivenTestCaseUndocumented
build​_cache:boolUndocumented
Returns
OptionsUndocumented
def get_suggest(self, program_text, incremental_step): (source)

Undocumented

Parameters
program​_text:strUndocumented
incremental​_step:intUndocumented
Returns
List[Tuple[str, str]]Undocumented
def maybe_suggest(self, step, server, src, tmp_dir): (source)

Undocumented

Parameters
step:intUndocumented
server:ServerUndocumented
src:strUndocumented
tmp​_dir:strUndocumented
Returns
List[str]Undocumented
def parse_sources(self, program_text, incremental_step, options): (source)

Return target BuildSources for a test case.

Normally, the unit tests will check all files included in the test case. This differs from how testcheck works by default, as dmypy doesn't currently support following imports.

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: main a.py

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

Parameters
program​_text:strUndocumented
incremental​_step:intUndocumented
options:OptionsUndocumented
Returns
List[BuildSource]Undocumented
def perform_step(self, operations, server, options, build_options, testcase, main_src, step, num_regular_incremental_steps): (source)

Perform one fine-grained incremental build step (after some file updates/deletions).

Return (mypy output, triggered targets).

Parameters
operations:List[Union[UpdateFile, DeleteFile]]Undocumented
server:ServerUndocumented
options:OptionsUndocumented
build​_options:OptionsUndocumented
testcase:DataDrivenTestCaseUndocumented
main​_src:strUndocumented
step:intUndocumented
num​_regular​_incremental​_steps:intUndocumented
Returns
Tuple[List[str], List[List[str]]]Undocumented
def run_case(self, testcase): (source)

Undocumented

Parameters
testcase:DataDrivenTestCaseUndocumented
def run_check(self, server, sources): (source)

Undocumented

Parameters
server:ServerUndocumented
sources:List[BuildSource]Undocumented
Returns
List[str]Undocumented
def should_skip(self, testcase): (source)

Undocumented

Parameters
testcase:DataDrivenTestCaseUndocumented
Returns
boolUndocumented
use_cache: bool = (source)