class documentation

Base class for pyi parsing tests.

Method check Check the parsing of src.
Method check_error Check that parsing the src raises the expected error.
Method parse Undocumented
Method setUp Undocumented
Instance Variable options Undocumented
def check(self, src, expected=None, prologue=None, name=None, version=None, platform='linux'): (source)

Check the parsing of src. This checks that parsing the source and then printing the resulting AST results in the expected text. Args: src: A source string. expected: Optional expected result string. If not provided, src is used instead. The special value IGNORE can be used to skip checking the parsed results against expected text. prologue: An optional prologue to be prepended to the expected text before comparison. Useful for imports that are introduced during printing the AST. name: The name of the module. version: A python version tuple (None for default value). platform: A platform string (defaults to "linux"). Returns: The parsed pytd.TypeDeclUnit.

def check_error(self, src, expected_line, message): (source)

Check that parsing the src raises the expected error.

def parse(self, src, name=None, version=None, platform='linux'): (source)

Undocumented

def setUp(self): (source)

Undocumented

Undocumented